Skip to content

Commit 30cf9f9

Browse files
authored
Merge pull request #8597 from swagger-api/v3-issue-8537
fixed test definition for codegen v3.
2 parents 5fcd323 + e259163 commit 30cf9f9

File tree

2 files changed

+745
-31
lines changed

2 files changed

+745
-31
lines changed

modules/swagger-codegen/src/test/resources/3_0_0/petstore-with-fake-endpoints-models-for-testing.yaml

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
openapi: 3.0.1
22
info:
33
title: Swagger Petstore
4-
description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose.'
4+
description: "This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\"
55
termsOfService: http://swagger.io/terms/
66
contact:
77
@@ -655,35 +655,6 @@ paths:
655655
enum:
656656
- 1
657657
- -2
658-
requestBody:
659-
content:
660-
'*/*':
661-
schema:
662-
properties:
663-
enum_form_string_array:
664-
type: array
665-
description: Form parameter enum test (string array)
666-
items:
667-
type: string
668-
default: $
669-
enum:
670-
- '>'
671-
- $
672-
enum_form_string:
673-
type: string
674-
description: Form parameter enum test (string)
675-
default: -efg
676-
enum:
677-
- _abc
678-
- -efg
679-
- (xyz)
680-
enum_query_double:
681-
type: number
682-
description: Query parameter enum test (double)
683-
format: double
684-
enum:
685-
- "1.1"
686-
- -1.2
687658
responses:
688659
400:
689660
description: Invalid request
@@ -881,6 +852,49 @@ paths:
881852
application/json:
882853
schema:
883854
$ref: '#/components/schemas/Client'
855+
/fake/enum/form:
856+
post:
857+
tags:
858+
- fake
859+
summary: To test enum parameters
860+
description: To test enum parameters
861+
operationId: testEnumRequestBody
862+
requestBody:
863+
content:
864+
'*/*':
865+
schema:
866+
properties:
867+
enum_form_string_array:
868+
type: array
869+
description: Form parameter enum test (string array)
870+
items:
871+
type: string
872+
default: $
873+
enum:
874+
- '>'
875+
- $
876+
enum_form_string:
877+
type: string
878+
description: Form parameter enum test (string)
879+
default: -efg
880+
enum:
881+
- _abc
882+
- -efg
883+
- (xyz)
884+
enum_query_double:
885+
type: number
886+
description: Query parameter enum test (double)
887+
format: double
888+
enum:
889+
- "1.1"
890+
- -1.2
891+
responses:
892+
400:
893+
description: Invalid request
894+
content: {}
895+
404:
896+
description: Not found
897+
content: {}
884898
/fake/outer/number:
885899
post:
886900
tags:
@@ -962,7 +976,7 @@ paths:
962976
schema:
963977
$ref: '#/components/schemas/OuterComposite'
964978
/fake/jsonFormData:
965-
get:
979+
post:
966980
tags:
967981
- fake
968982
summary: test json serialization of form data

0 commit comments

Comments
 (0)