-
Notifications
You must be signed in to change notification settings - Fork 37
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
Showing
14 changed files
with
991 additions
and
500 deletions.
There are no files selected for viewing
913 changes: 431 additions & 482 deletions
913
documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md
Large diffs are not rendered by default.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
documents/forOpenAPISpecification/reference/DB_OpenAPI_Mapping_Example.md
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-6.86 KB
documents/forOpenAPISpecification/reference/divided_files_sample.zip
Binary file not shown.
10 changes: 10 additions & 0 deletions
10
documents/forOpenAPISpecification/sample_divided/common/error.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,10 @@ | ||
type: object | ||
required: | ||
- code | ||
- message | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
message: | ||
type: string |
32 changes: 32 additions & 0 deletions
32
documents/forOpenAPISpecification/sample_divided/common/pet.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,32 @@ | ||
type: object | ||
required: | ||
- id | ||
- name | ||
- category | ||
- age | ||
- sex | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
maxLength: 50 | ||
category: | ||
type: string | ||
maxLength: 10 | ||
sub_category: | ||
type: string | ||
maxLength: 50 | ||
age: | ||
type: integer | ||
format: int32 | ||
sex: | ||
type: string | ||
maxLength: 6 | ||
note: | ||
type: string | ||
maxLength: 200 | ||
tag: | ||
type: string | ||
maxLength: 20 |
264 changes: 264 additions & 0 deletions
264
documents/forOpenAPISpecification/sample_divided/openapi.gen.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,264 @@ | ||
openapi: 3.0.3 | ||
info: | ||
version: 1.0.0 | ||
title: Swagger Petstore | ||
license: | ||
name: MIT | ||
servers: | ||
- url: 'http://petstore.swagger.io/v1' | ||
tags: | ||
- name: pets | ||
description: Everything about your Pets | ||
paths: | ||
/pets: | ||
get: | ||
summary: List all pets | ||
operationId: get-pets | ||
tags: | ||
- pets | ||
parameters: | ||
- name: limit | ||
in: query | ||
description: How many items to return at one time (max 100) | ||
required: false | ||
schema: | ||
type: integer | ||
maximum: 100 | ||
format: int32 | ||
responses: | ||
'200': | ||
description: A paged array of pets | ||
headers: | ||
x-next: | ||
description: A link to the next page of responses | ||
schema: | ||
type: string | ||
content: | ||
application/json: | ||
schema: | ||
type: array | ||
maxItems: 100 | ||
items: | ||
$ref: '#/components/schemas/Pet' | ||
examples: | ||
ResExample1: | ||
value: | ||
- id: 10001 | ||
name: ToyPoodle | ||
category: dog | ||
sub_category: ToyPoodle | ||
age: 1 | ||
sex: male | ||
note: friendly | ||
tag: dog10001 | ||
- id: 10002 | ||
name: Chihuahua | ||
category: dog | ||
sub_category: Chihuahua | ||
age: 1 | ||
sex: female | ||
note: friendly | ||
tag: dog10002 | ||
- id: 10003 | ||
name: Shiba | ||
category: dog | ||
sub_category: Shiba | ||
age: 1 | ||
sex: male | ||
note: friendly | ||
tag: dog10003 | ||
- id: 10004 | ||
name: MiniatureDachshund | ||
category: dog | ||
sub_category: MiniatureDachshund | ||
age: 1 | ||
sex: female | ||
note: friendly | ||
tag: dog10004 | ||
ResExample2: | ||
value: [] | ||
'404': | ||
description: not found error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
'500': | ||
description: unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
post: | ||
summary: Register a pet | ||
operationId: post-pets | ||
tags: | ||
- pets | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
required: | ||
- pet | ||
type: object | ||
properties: | ||
pet: | ||
$ref: '#/components/schemas/Pet' | ||
examples: | ||
ReqExample1: | ||
value: | ||
pet: | ||
id: 10005 | ||
name: FrenchBulldog | ||
category: dog | ||
sub_category: FrenchBulldog | ||
age: 1 | ||
sex: male | ||
note: friendly | ||
tag: dog10005 | ||
required: false | ||
responses: | ||
'201': | ||
description: Null response | ||
'404': | ||
description: not found error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
'500': | ||
description: unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
'/pets/{petId}': | ||
get: | ||
summary: Details for a pet | ||
operationId: get-pets-pet-id | ||
tags: | ||
- pets | ||
parameters: | ||
- name: petId | ||
in: path | ||
required: true | ||
description: The id of the pet to retrieve | ||
schema: | ||
type: string | ||
responses: | ||
'200': | ||
description: Expected response to a valid request | ||
content: | ||
application/json: | ||
schema: | ||
required: | ||
- pet | ||
- pet_detail | ||
type: object | ||
properties: | ||
pet: | ||
$ref: '#/components/schemas/Pet' | ||
pet_detail: | ||
$ref: '#/components/schemas/PetDetail' | ||
examples: | ||
ResExample1: | ||
value: | ||
pet: | ||
id: 10001 | ||
name: ToyPoodle | ||
category: dog | ||
sub_category: ToyPoodle | ||
age: 1 | ||
sex: male | ||
note: friendly | ||
tag: dog10001 | ||
pet_detail: | ||
breeder: BreederName | ||
date_of_birth: '2023-10-31' | ||
pedigree: | ||
registration_no: 11111111 | ||
date_of_registration: '2023-10-31' | ||
pedigree_image: 9j2wBDAA...8QAPxAAAQQABAMGBAYDAAEDAg | ||
'404': | ||
description: not found error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
'500': | ||
description: unexpected error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Error' | ||
components: | ||
schemas: | ||
PetDetail: | ||
type: object | ||
properties: | ||
breeder: | ||
type: string | ||
date_of_birth: | ||
type: string | ||
format: date | ||
pedigree: | ||
$ref: '#/components/schemas/Pedigree' | ||
Pedigree: | ||
required: | ||
- registration_no | ||
- date_of_registration | ||
- pedigree_image | ||
type: object | ||
properties: | ||
registration_no: | ||
type: integer | ||
format: int64 | ||
date_of_registration: | ||
type: string | ||
format: date | ||
pedigree_image: | ||
type: string | ||
Pet: | ||
type: object | ||
required: | ||
- id | ||
- name | ||
- category | ||
- age | ||
- sex | ||
properties: | ||
id: | ||
type: integer | ||
format: int64 | ||
name: | ||
type: string | ||
maxLength: 50 | ||
category: | ||
type: string | ||
maxLength: 10 | ||
sub_category: | ||
type: string | ||
maxLength: 50 | ||
age: | ||
type: integer | ||
format: int32 | ||
sex: | ||
type: string | ||
maxLength: 6 | ||
note: | ||
type: string | ||
maxLength: 200 | ||
tag: | ||
type: string | ||
maxLength: 20 | ||
Error: | ||
type: object | ||
required: | ||
- code | ||
- message | ||
properties: | ||
code: | ||
type: integer | ||
format: int32 | ||
message: | ||
type: string |
30 changes: 30 additions & 0 deletions
30
documents/forOpenAPISpecification/sample_divided/openapi.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,30 @@ | ||
openapi: "3.0.3" | ||
info: | ||
version: 1.0.0 | ||
title: Swagger Petstore | ||
license: | ||
name: MIT | ||
servers: | ||
- url: http://petstore.swagger.io/v1 | ||
tags: | ||
- name: pets | ||
description: Everything about your Pets | ||
paths: | ||
/pets: | ||
get: | ||
$ref: "./pets_get/pets_get.yaml#/operation" | ||
post: | ||
$ref: "./pets_post/pets_post.yaml#/operation" | ||
/pets/{petId}: | ||
get: | ||
$ref: "./pets-pet-id_get/pets-pet-id_get.yaml#/operation" | ||
components: | ||
schemas: | ||
PetDetail: | ||
$ref: "./pets-pet-id_get/pets-pet-id_get.yaml#/components/schemas/PetDetail" | ||
Pedigree: | ||
$ref: "./pets-pet-id_get/pets-pet-id_get.yaml#/components/schemas/Pedigree" | ||
Pet: | ||
$ref: "./common/pet.yaml" | ||
Error: | ||
$ref: "./common/error.yaml" |
16 changes: 16 additions & 0 deletions
16
documents/forOpenAPISpecification/sample_divided/pets-pet-id_get/examples/res_example1.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,16 @@ | ||
pet: | ||
id: 10001 | ||
name: ToyPoodle | ||
category: dog | ||
sub_category: ToyPoodle | ||
age: 1 | ||
sex: male | ||
note: friendly | ||
tag: dog10001 | ||
pet_detail: | ||
breeder: BreederName | ||
date_of_birth: '2023-10-31' | ||
pedigree: | ||
registration_no: 11111111 | ||
date_of_registration: '2023-10-31' | ||
pedigree_image: 9j2wBDAA...8QAPxAAAQQABAMGBAYDAAEDAg |
Oops, something went wrong.