Skip to content

Commit 9c71444

Browse files
committed
Add a fake endpoint to test enum request parameters
1 parent 6f37a58 commit 9c71444

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

  • modules/openapi-generator/src/test/resources/3_0/cpp-restsdk

modules/openapi-generator/src/test/resources/3_0/cpp-restsdk/petstore.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,34 @@ paths:
117117
security:
118118
- petstore_auth:
119119
- 'read:pets'
120+
/pet/findByColor:
121+
get:
122+
tags:
123+
- pet
124+
summary: Finds Pets by color
125+
description: Returns pets filtered by color.
126+
operationId: findPetsByColor
127+
parameters:
128+
- name: color
129+
in: query
130+
description: Color of the pet to filter by
131+
required: false
132+
schema:
133+
$ref: '#/components/schemas/Color'
134+
responses:
135+
'200':
136+
description: successful operation
137+
content:
138+
application/json:
139+
schema:
140+
type: array
141+
items:
142+
$ref: '#/components/schemas/Pet'
143+
'400':
144+
description: Invalid color value
145+
security:
146+
- petstore_auth:
147+
- 'read:pets'
120148
/pet/findByTags:
121149
get:
122150
tags:
@@ -748,6 +776,18 @@ components:
748776
- sold
749777
xml:
750778
name: Pet
779+
Color:
780+
title: Pet Color
781+
description: pet color in the store
782+
type: string
783+
enum:
784+
- black
785+
- white
786+
- brown
787+
- golden
788+
- mixed
789+
xml:
790+
name: Pet
751791
ApiResponse:
752792
title: An uploaded response
753793
description: Describes the result of uploading an image resource

0 commit comments

Comments
 (0)