Skip to content

Commit 72630f7

Browse files
committed
Refactored petstore-separate examples into dir
1 parent 1feb273 commit 72630f7

File tree

7 files changed

+39
-39
lines changed

7 files changed

+39
-39
lines changed

examples/v2.0/yaml/petstore-separate-common.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
type: object
2+
required:
3+
- code
4+
- message
5+
properties:
6+
code:
7+
type: integer
8+
format: int32
9+
message:
10+
type: string

examples/v2.0/yaml/petstore-separate/definitions.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
type: object
2+
allOf:
3+
- $ref: 'Pet.yaml'
4+
- required:
5+
- name
6+
properties:
7+
description:
8+
type: integer
9+
format: int64
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
type: object
2+
required:
3+
- id
4+
- name
5+
properties:
6+
id:
7+
type: integer
8+
format: int64
9+
name:
10+
type: string
11+
tag:
12+
type: string

examples/v2.0/yaml/petstore-separate/swagger.yaml renamed to examples/v2.0/yaml/petstore-separate/spec/swagger.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ paths:
3737
schema:
3838
type: array
3939
items:
40-
$ref: 'definitions.yaml#/Pet'
40+
$ref: 'Pet.yaml'
4141
default:
4242
description: unexpected error
4343
schema:
44-
$ref: '../petstore-separate-common.yaml#/Error'
44+
$ref: '../common/Error.yaml'
4545
post:
4646
description: Creates a new pet in the store. Duplicates are allowed
4747
operationId: addPet
@@ -51,16 +51,16 @@ paths:
5151
description: Pet to add to the store
5252
required: true
5353
schema:
54-
$ref: 'definitions.yaml#/NewPet'
54+
$ref: 'NewPet.yaml'
5555
responses:
5656
200:
5757
description: pet response
5858
schema:
59-
$ref: 'definitions.yaml#/Pet'
59+
$ref: 'Pet.yaml'
6060
default:
6161
description: unexpected error
6262
schema:
63-
$ref: '../petstore-separate-common.yaml#/Error'
63+
$ref: '../common/Error.yaml'
6464
/pets/{id}:
6565
get:
6666
description: Returns a user based on a single ID, if the user does not have access to the pet
@@ -76,11 +76,11 @@ paths:
7676
200:
7777
description: pet response
7878
schema:
79-
$ref: 'definitions.yaml#/Pet'
79+
$ref: 'Pet.yaml'
8080
default:
8181
description: unexpected error
8282
schema:
83-
$ref: '../petstore-separate-common.yaml#/Error'
83+
$ref: '../common/Error.yaml'
8484
delete:
8585
description: deletes a single pet based on the ID supplied
8686
operationId: deletePet
@@ -97,4 +97,4 @@ paths:
9797
default:
9898
description: unexpected error
9999
schema:
100-
$ref: '../petstore-separate-common.yaml#/Error'
100+
$ref: '../common/Error.yaml'

0 commit comments

Comments
 (0)