Skip to content

Commit 9c38c13

Browse files
committed
[C] Add test schemas for the recent changes
The recent commit 47665aa ("Fix a few issues with the C generator (part 1 version 2) (OpenAPITools#14434)") didn't include any test schemas. Add them now, as requested: OpenAPITools#14434 (comment)
1 parent f8ca36b commit 9c38c13

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

modules/openapi-generator/src/test/resources/2_0/c/petstore.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ paths:
7575
- petstore_auth:
7676
- 'write:pets'
7777
- 'read:pets'
78+
/pet/specialty:
79+
get:
80+
tags:
81+
- pet
82+
summary: Specialty of the shop
83+
description: Returns the kind of pet the store specializes in
84+
operationId: specialtyPet
85+
produces:
86+
- application/xml
87+
- application/json
88+
parameters: []
89+
responses:
90+
'200':
91+
description: successful operation
92+
schema:
93+
$ref: '#/definitions/Preference'
94+
security:
95+
- api_key: []
7896
/pet/findByStatus:
7997
get:
8098
tags:
@@ -626,6 +644,17 @@ definitions:
626644
type: string
627645
xml:
628646
name: Category
647+
Preference:
648+
title: Pet preference
649+
description: A user's preference in pets
650+
type: string
651+
enum:
652+
- cats
653+
- dogs
654+
- birds
655+
- fish
656+
- snakes
657+
- other
629658
User:
630659
title: a User
631660
description: A User who is purchasing from the pet store
@@ -650,6 +679,12 @@ definitions:
650679
type: integer
651680
format: int32
652681
description: User Status
682+
extra:
683+
type: object
684+
nullable: true
685+
additionalProperties: true
686+
preference:
687+
$ref: '#/definitions/Preference'
653688
xml:
654689
name: User
655690
Tag:

0 commit comments

Comments
 (0)