diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-27 15:10:20 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-27 15:10:20 +0300 |
commit | d6404862287ded00725865e56cda3a6fb4f2a1c7 (patch) | |
tree | 42d61369c8467e4bade74323f50ce92827c50370 /doc/api/openapi | |
parent | 1e5ef4fb10af5ecf7eb7304077278b99dcba64dd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/openapi')
-rw-r--r-- | doc/api/openapi/openapi.yaml | 26 | ||||
-rw-r--r-- | doc/api/openapi/v4/version.yaml | 28 |
2 files changed, 54 insertions, 0 deletions
diff --git a/doc/api/openapi/openapi.yaml b/doc/api/openapi/openapi.yaml new file mode 100644 index 00000000000..8aa4de62501 --- /dev/null +++ b/doc/api/openapi/openapi.yaml @@ -0,0 +1,26 @@ +openapi: "3.0.0" +info: + description: | + An OpenAPI definition for the GitLab REST API. + Only one API resource/endpoint is currently included. + The intent is to expand this to match the entire Markdown documentation of the API: + <https://docs.gitlab.com/ee/api/>. Contributions are welcome. + + When viewing this on gitlab.com, you can test API calls directly from the browser + against the `gitlab.com` instance, if you are logged in. + The feature uses the current [GitLab session cookie](https://docs.gitlab.com/ee/api/README.html#session-cookie), + so each request is made using your account. + + Read more at <https://docs.gitlab.com/ee/development/documentation/styleguide.html#restful-api>. + version: "v4" + title: "GitLab API" + termsOfService: "https://about.gitlab.com/terms/" + license: + name: "CC BY-SA 4.0" + url: "https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE" +servers: + - url: "https://gitlab.com/api/" + +paths: + /v4/version: + $ref: "v4/version.yaml" diff --git a/doc/api/openapi/v4/version.yaml b/doc/api/openapi/v4/version.yaml new file mode 100644 index 00000000000..3a689840f4c --- /dev/null +++ b/doc/api/openapi/v4/version.yaml @@ -0,0 +1,28 @@ +# Markdown documentation: https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/api/version.md + +get: + tags: + - version + summary: "Retrieve version information for this GitLab instance." + operationId: "getVersion" + responses: + "401": + description: "unauthorized operation" + "200": + description: "successful operation" + content: + "application/json": + schema: + title: "VersionResponse" + type: "object" + properties: + version: + type: "string" + revision: + type: "string" + examples: + Example: + value: + version: "13.3.0-pre" + revision: "f2b05afebb0" + |