-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sanitization logic for generated flatten schema names
- Loading branch information
1 parent
dd5a48e
commit 22dce50
Showing
5 changed files
with
363 additions
and
8 deletions.
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
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
150 changes: 150 additions & 0 deletions
150
openapi-cli/src/test/resources/cmd/flatten/flattened_openapi_composed_schema.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,150 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Swagger Petstore | ||
license: | ||
name: MIT | ||
version: 1.0.0 | ||
servers: | ||
- url: / | ||
paths: | ||
/pets: | ||
get: | ||
tags: | ||
- pets | ||
summary: List all pets | ||
operationId: listPets | ||
responses: | ||
"200": | ||
description: An paged array of pets | ||
headers: | ||
x-next: | ||
description: A link to the next page of responses | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: "#/components/schemas/InlineResponse200" | ||
post: | ||
tags: | ||
- pets | ||
summary: Create a pet | ||
operationId: createPets | ||
requestBody: | ||
description: Created pet object | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/PetsBody" | ||
required: true | ||
responses: | ||
"201": | ||
description: Null response | ||
/pets/{petId}: | ||
get: | ||
tags: | ||
- pets | ||
summary: Info for a specific pet | ||
operationId: showPetById | ||
parameters: | ||
- name: petId | ||
in: path | ||
description: The id of the pet to retrieve | ||
required: true | ||
style: simple | ||
explode: false | ||
schema: | ||
type: integer | ||
format: int64 | ||
responses: | ||
"200": | ||
description: Expected response to a valid request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/InlineResponse2001" | ||
/locations: | ||
get: | ||
tags: | ||
- locations | ||
summary: List all locations | ||
operationId: listLocations | ||
parameters: | ||
- name: area | ||
in: query | ||
description: area to filter by | ||
required: false | ||
style: form | ||
explode: true | ||
schema: | ||
type: string | ||
responses: | ||
"200": | ||
description: An paged array of locations | ||
headers: | ||
x-next: | ||
description: A link to the next page of responses | ||
style: simple | ||
explode: false | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
items: | ||
$ref: "#/components/schemas/PetsOneOf1" | ||
components: | ||
schemas: | ||
PetspetsOneOf12: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
tag: | ||
type: string | ||
InlineResponse2001: | ||
oneOf: | ||
- type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
tag: | ||
type: string | ||
- type: object | ||
properties: | ||
code: | ||
type: integer | ||
message: | ||
type: string | ||
InlineResponse200: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
tag: | ||
type: string | ||
PetsOneOf1: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
tag: | ||
type: string | ||
PetsBody: | ||
oneOf: | ||
- $ref: "#/components/schemas/PetsOneOf1" | ||
- $ref: "#/components/schemas/PetspetsOneOf12" |
Oops, something went wrong.