-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c1a7b9
commit 49b5e31
Showing
6 changed files
with
787 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
174 changes: 174 additions & 0 deletions
174
openapi-cli/src/test/resources/cmd/sanitize/openapi_2.0.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
swagger: "2.0" | ||
info: | ||
title: Api V1 | ||
version: 0.0.0 | ||
host: "localhost:8080" | ||
basePath: "/api/v1" | ||
schemes: | ||
- http | ||
paths: | ||
/albums: | ||
get: | ||
tags: | ||
- albums | ||
operationId: getAlbums | ||
produces: | ||
- application/json | ||
parameters: | ||
- name: _artists_ | ||
in: query | ||
type: array | ||
items: | ||
type: string | ||
collectionFormat: csv | ||
default: [] | ||
- name: X-API-VERSION | ||
in: header | ||
type: string | ||
default: v1 | ||
responses: | ||
"200": | ||
description: Ok | ||
schema: | ||
type: array | ||
items: | ||
$ref: "#/definitions/album" | ||
"400": | ||
description: BadRequest | ||
schema: | ||
$ref: "#/definitions/ErrorPayload" | ||
post: | ||
tags: | ||
- albums | ||
operationId: postAlbum | ||
produces: | ||
- application/json | ||
consumes: | ||
- application/json | ||
parameters: | ||
- in: body | ||
name: body | ||
required: true | ||
schema: | ||
$ref: "#/definitions/album" | ||
responses: | ||
"201": | ||
description: Created | ||
schema: | ||
$ref: "#/definitions/album" | ||
"400": | ||
description: BadRequest | ||
schema: | ||
$ref: "#/definitions/ErrorPayload" | ||
/albums/{_id}: | ||
get: | ||
tags: | ||
- albums | ||
operationId: getAlbumById | ||
produces: | ||
- application/json | ||
parameters: | ||
- name: _id | ||
in: path | ||
required: true | ||
type: string | ||
responses: | ||
"200": | ||
description: Ok | ||
schema: | ||
$ref: "#/definitions/album" | ||
"404": | ||
description: NotFound | ||
schema: | ||
$ref: "#/definitions/message" | ||
"400": | ||
description: BadRequest | ||
schema: | ||
$ref: "#/definitions/ErrorPayload" | ||
/albums/{id}/artist: | ||
get: | ||
tags: | ||
- artists | ||
operationId: getArtistByAlbum | ||
produces: | ||
- application/json | ||
parameters: | ||
- name: id | ||
in: path | ||
required: true | ||
type: string | ||
responses: | ||
"200": | ||
description: Ok | ||
schema: | ||
$ref: "#/definitions/album_aRTIST" | ||
"400": | ||
description: BadRequest | ||
schema: | ||
$ref: "#/definitions/ErrorPayload" | ||
definitions: | ||
ErrorPayload: | ||
required: | ||
- message | ||
- method | ||
- path | ||
- reason | ||
- status | ||
- timestamp | ||
type: object | ||
properties: | ||
timestamp: | ||
type: string | ||
status: | ||
type: integer | ||
format: int64 | ||
reason: | ||
type: string | ||
message: | ||
type: string | ||
path: | ||
type: string | ||
method: | ||
type: string | ||
album: | ||
required: | ||
- _id | ||
- artist | ||
- title | ||
type: object | ||
properties: | ||
_id: | ||
type: string | ||
title: | ||
type: string | ||
artist: | ||
type: string | ||
additionalProperties: false | ||
album_aRTIST: | ||
required: | ||
- albums | ||
- id | ||
- name | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
name: | ||
type: string | ||
albums: | ||
type: array | ||
items: | ||
$ref: "#/definitions/album" | ||
additionalProperties: false | ||
message: | ||
required: | ||
- code | ||
- message | ||
type: object | ||
properties: | ||
message: | ||
type: string | ||
code: | ||
type: integer | ||
format: int64 | ||
additionalProperties: false |
Oops, something went wrong.