backstage
1apiVersion: backstage.io/v1alpha1
2kind: API
3metadata:
4name: petstore
5description: The petstore API
6tags:
7- store
8- rest
9spec:
10type: openapi
11lifecycle: experimental
12owner: team-c
13definition: |
14openapi: "3.0.0"
15info:
16version: 1.0.0
17title: Swagger Petstore
18license:
19name: MIT
20servers:
21- url: http://petstore.swagger.io/v1
22paths:
23/pets:
24get:
25summary: List all pets
26operationId: listPets
27tags:
28- pets
29parameters:
30- name: limit
31in: query
32description: How many items to return at one time (max 100)
33required: false
34schema:
35type: integer
36format: int32
37responses:
38'200':
39description: A paged array of pets
40headers:
41x-next:
42description: A link to the next page of responses
43schema:
44type: string
45content:
46application/json:
47schema:
48$ref: "#/components/schemas/Pets"
49default:
50description: unexpected error
51content:
52application/json:
53schema:
54$ref: "#/components/schemas/Error"
55post:
56summary: Create a pet
57operationId: createPets
58tags:
59- pets
60responses:
61'201':
62description: Null response
63default:
64description: unexpected error
65content:
66application/json:
67schema:
68$ref: "#/components/schemas/Error"
69/pets/{petId}:
70get:
71summary: Info for a specific pet
72operationId: showPetById
73tags:
74- pets
75parameters:
76- name: petId
77in: path
78required: true
79description: The id of the pet to retrieve
80schema:
81type: string
82responses:
83'200':
84description: Expected response to a valid request
85content:
86application/json:
87schema:
88$ref: "#/components/schemas/Pet"
89default:
90description: unexpected error
91content:
92application/json:
93schema:
94$ref: "#/components/schemas/Error"
95components:
96schemas:
97Pet:
98type: object
99required:
100- id
101- name
102properties:
103id:
104type: integer
105format: int64
106name:
107type: string
108tag:
109type: string
110Pets:
111type: array
112items:
113$ref: "#/components/schemas/Pet"
114Error:
115type: object
116required:
117- code
118- message
119properties:
120code:
121type: integer
122format: int32
123message:
124type: string
125