diff --git a/README.md b/README.md index aaf61dc05..59ab0aae3 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ The operation described in your specification is automatically linked to your Py post: operationId: run.post_greeting responses: - 200: + '200': content: text/plain: schema: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index c5744895b..0b728a3a4 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -142,7 +142,7 @@ register an API defined by an OpenAPI (or Swagger) specification. post: operationId: run.post_greeting responses: - 200: + '200': description: "Greeting response" content: text/plain: diff --git a/examples/basicauth/spec/swagger.yaml b/examples/basicauth/spec/swagger.yaml index 12d098bdd..ca66a6c61 100644 --- a/examples/basicauth/spec/swagger.yaml +++ b/examples/basicauth/spec/swagger.yaml @@ -9,7 +9,7 @@ paths: summary: Return secret string operationId: app.get_secret responses: - 200: + '200': description: secret response schema: type: string diff --git a/examples/frameworks/spec/openapi.yaml b/examples/frameworks/spec/openapi.yaml index 4f6f029a3..b514e51ce 100644 --- a/examples/frameworks/spec/openapi.yaml +++ b/examples/frameworks/spec/openapi.yaml @@ -13,7 +13,7 @@ paths: description: Generates a greeting message. operationId: post_greeting responses: - 200: + '200': description: greeting response content: text/plain: diff --git a/examples/frameworks/spec/swagger.yaml b/examples/frameworks/spec/swagger.yaml index 5f50fa91f..2064866cb 100644 --- a/examples/frameworks/spec/swagger.yaml +++ b/examples/frameworks/spec/swagger.yaml @@ -15,7 +15,7 @@ paths: produces: - text/plain; responses: - 200: + '200': description: greeting response schema: type: string diff --git a/examples/helloworld/spec/openapi.yaml b/examples/helloworld/spec/openapi.yaml index 476b30d12..9ec78d962 100644 --- a/examples/helloworld/spec/openapi.yaml +++ b/examples/helloworld/spec/openapi.yaml @@ -13,7 +13,7 @@ paths: description: Generates a greeting message. operationId: hello.post_greeting responses: - 200: + '200': description: greeting response content: text/plain: diff --git a/examples/helloworld/spec/swagger.yaml b/examples/helloworld/spec/swagger.yaml index 9319818e6..31e80f958 100644 --- a/examples/helloworld/spec/swagger.yaml +++ b/examples/helloworld/spec/swagger.yaml @@ -15,7 +15,7 @@ paths: produces: - text/plain; responses: - 200: + '200': description: greeting response schema: type: string diff --git a/examples/helloworld_async/spec/openapi.yaml b/examples/helloworld_async/spec/openapi.yaml index 1b94d288b..dc106ff1b 100644 --- a/examples/helloworld_async/spec/openapi.yaml +++ b/examples/helloworld_async/spec/openapi.yaml @@ -13,7 +13,7 @@ paths: description: Generates a greeting message. operationId: hello.post_greeting responses: - 200: + '200': description: greeting response content: text/plain: diff --git a/examples/helloworld_async/spec/swagger.yaml b/examples/helloworld_async/spec/swagger.yaml index d42b32696..948e0418b 100644 --- a/examples/helloworld_async/spec/swagger.yaml +++ b/examples/helloworld_async/spec/swagger.yaml @@ -12,7 +12,7 @@ paths: description: Generates a greeting message. operationId: hello.post_greeting responses: - 200: + '200': description: greeting response schema: type: string diff --git a/examples/oauth2/spec/mock_tokeninfo.yaml b/examples/oauth2/spec/mock_tokeninfo.yaml index 9f2eb9f6f..de93bd321 100644 --- a/examples/oauth2/spec/mock_tokeninfo.yaml +++ b/examples/oauth2/spec/mock_tokeninfo.yaml @@ -10,7 +10,7 @@ paths: summary: OAuth2 token info operationId: mock_tokeninfo.get_tokeninfo responses: - 200: + '200': description: Token info object schema: type: object diff --git a/examples/oauth2/spec/openapi.yaml b/examples/oauth2/spec/openapi.yaml index 1d07ea2e8..ce4974b36 100644 --- a/examples/oauth2/spec/openapi.yaml +++ b/examples/oauth2/spec/openapi.yaml @@ -13,7 +13,7 @@ paths: summary: Return secret string operationId: app.get_secret responses: - 200: + '200': description: secret response content: 'text/plain': diff --git a/examples/oauth2/spec/swagger.yaml b/examples/oauth2/spec/swagger.yaml index 1354164b8..5cd109839 100644 --- a/examples/oauth2/spec/swagger.yaml +++ b/examples/oauth2/spec/swagger.yaml @@ -12,7 +12,7 @@ paths: summary: Return secret string operationId: app.get_secret responses: - 200: + '200': description: secret response schema: type: string diff --git a/examples/oauth2_local_tokeninfo/spec/openapi.yaml b/examples/oauth2_local_tokeninfo/spec/openapi.yaml index aaa2b57a2..0a2159536 100644 --- a/examples/oauth2_local_tokeninfo/spec/openapi.yaml +++ b/examples/oauth2_local_tokeninfo/spec/openapi.yaml @@ -13,7 +13,7 @@ paths: summary: Return secret string operationId: app.get_secret responses: - 200: + '200': description: secret response content: text/plain: diff --git a/examples/oauth2_local_tokeninfo/spec/swagger.yaml b/examples/oauth2_local_tokeninfo/spec/swagger.yaml index 9e0d2f6b1..d7038c2f9 100644 --- a/examples/oauth2_local_tokeninfo/spec/swagger.yaml +++ b/examples/oauth2_local_tokeninfo/spec/swagger.yaml @@ -12,7 +12,7 @@ paths: summary: Return secret string operationId: app.get_secret responses: - 200: + '200': description: secret response schema: type: string diff --git a/examples/sqlalchemy/spec/swagger.yaml b/examples/sqlalchemy/spec/swagger.yaml index 147b34bb9..236a92a83 100644 --- a/examples/sqlalchemy/spec/swagger.yaml +++ b/examples/sqlalchemy/spec/swagger.yaml @@ -24,7 +24,7 @@ paths: minimum: 0 default: 100 responses: - 200: + '200': description: Return pets schema: type: array @@ -38,11 +38,11 @@ paths: parameters: - $ref: '#/parameters/pet_id' responses: - 200: + '200': description: Return pet schema: $ref: '#/definitions/Pet' - 404: + '404': description: Pet does not exist put: tags: [Pets] @@ -55,9 +55,9 @@ paths: schema: $ref: '#/definitions/Pet' responses: - 200: + '200': description: Pet updated - 201: + '201': description: New pet created delete: tags: [Pets] @@ -66,9 +66,9 @@ paths: parameters: - $ref: '#/parameters/pet_id' responses: - 204: + '204': description: Pet was deleted - 404: + '404': description: Pet does not exist diff --git a/tests/fixtures/bad_operations/swagger.yaml b/tests/fixtures/bad_operations/swagger.yaml index 9bfca52cf..efc676005 100644 --- a/tests/fixtures/bad_operations/swagger.yaml +++ b/tests/fixtures/bad_operations/swagger.yaml @@ -11,21 +11,21 @@ paths: get: operationId: no.module.or.function responses: - 200: + '200': description: greeting response schema: type: object put: # operationId: XXX completely missing responses: - 200: + '200': description: greeting response schema: type: object post: operationId: fakeapi.module_with_error.something responses: - 200: + '200': description: greeting response schema: type: object diff --git a/tests/fixtures/bad_specs/swagger.yaml b/tests/fixtures/bad_specs/swagger.yaml index dff8c3000..d0c9e66d6 100644 --- a/tests/fixtures/bad_specs/swagger.yaml +++ b/tests/fixtures/bad_specs/swagger.yaml @@ -17,7 +17,7 @@ paths: type: integer default: somestring responses: - 200: + '200': description: search schema: type: object diff --git a/tests/fixtures/datetime_support/openapi.yaml b/tests/fixtures/datetime_support/openapi.yaml index 44d3a7649..cf169c518 100644 --- a/tests/fixtures/datetime_support/openapi.yaml +++ b/tests/fixtures/datetime_support/openapi.yaml @@ -12,7 +12,7 @@ paths: summary: Generate data with date time operationId: fakeapi.hello.get_datetime responses: - 200: + '200': description: date time example content: application/json: @@ -29,7 +29,7 @@ paths: summary: Generate data with date operationId: fakeapi.hello.get_date responses: - 200: + '200': description: date example content: application/json: @@ -46,7 +46,7 @@ paths: summary: Generate data with uuid operationId: fakeapi.hello.get_uuid responses: - 200: + '200': description: uuid example content: application/json: diff --git a/tests/fixtures/datetime_support/swagger.yaml b/tests/fixtures/datetime_support/swagger.yaml index 5d388af24..06674affb 100644 --- a/tests/fixtures/datetime_support/swagger.yaml +++ b/tests/fixtures/datetime_support/swagger.yaml @@ -11,7 +11,7 @@ paths: get: operationId: fakeapi.hello.get_datetime responses: - 200: + '200': description: date time example schema: type: object @@ -25,7 +25,7 @@ paths: get: operationId: fakeapi.hello.get_date responses: - 200: + '200': description: date example schema: type: object @@ -40,7 +40,7 @@ paths: summary: Generate data with uuid operationId: fakeapi.hello.get_uuid responses: - 200: + '200': description: uuid example schema: type: object diff --git a/tests/fixtures/default_param_error/swagger.yaml b/tests/fixtures/default_param_error/swagger.yaml index f0ee7ed7e..8c930ef78 100644 --- a/tests/fixtures/default_param_error/swagger.yaml +++ b/tests/fixtures/default_param_error/swagger.yaml @@ -12,7 +12,7 @@ paths: summary: Default value does not match the param type operationId: fakeapi.hello.test_default_mismatch_definition responses: - 200: + '200': description: OK parameters: - name: age diff --git a/tests/fixtures/different_schemas/swagger.yaml b/tests/fixtures/different_schemas/swagger.yaml index 5b743d698..4d3bba247 100644 --- a/tests/fixtures/different_schemas/swagger.yaml +++ b/tests/fixtures/different_schemas/swagger.yaml @@ -29,7 +29,7 @@ paths: produces: - application/json responses: - 200: + '200': description: goodbye response schema: $ref: '#/definitions/new_stack' @@ -48,7 +48,7 @@ paths: required: true type: string responses: - 200: + '200': description: Requested new_stack data model schema: $ref: '#/definitions/new_stack' @@ -67,7 +67,7 @@ paths: required: true type: string responses: - 200: + '200': description: Requested new_stack data model schema: type: string @@ -86,7 +86,7 @@ paths: required: true type: string responses: - 200: + '200': description: Requested new_stack data model schema: type: integer @@ -105,7 +105,7 @@ paths: required: true type: string responses: - 200: + '200': description: Requested new_stack data model schema: type: number @@ -124,7 +124,7 @@ paths: required: true type: string responses: - 200: + '200': description: Requested new_stack data model schema: type: boolean @@ -143,7 +143,7 @@ paths: required: true type: string responses: - 200: + '200': description: Requested new_stack data model schema: type: array @@ -167,7 +167,7 @@ paths: produces: - application/json responses: - 200: + '200': description: goodbye response schema: $ref: '#/definitions/new_stack' @@ -188,7 +188,7 @@ paths: produces: - application/json responses: - 200: + '200': description: goodbye response schema: type: string @@ -209,7 +209,7 @@ paths: produces: - application/json responses: - 200: + '200': description: goodbye response schema: type: string @@ -228,7 +228,7 @@ paths: produces: - application/json responses: - 200: + '200': description: goodbye response schema: type: string @@ -248,7 +248,7 @@ paths: produces: - application/json responses: - 200: + '200': description: goodbye response schema: type: string @@ -264,7 +264,7 @@ paths: schema: type: integer responses: - 200: + '200': description: OK /schema_array: @@ -280,7 +280,7 @@ paths: items: type: string responses: - 200: + '200': description: OK /define_global_response: @@ -288,7 +288,7 @@ paths: description: Should allow global response definitions operationId: fakeapi.hello.test_global_response_definition responses: - 200: + '200': $ref: '#/responses/GeneralList' /media_range: diff --git a/tests/fixtures/json_validation/openapi.yaml b/tests/fixtures/json_validation/openapi.yaml index 356ffd580..d48db6a10 100644 --- a/tests/fixtures/json_validation/openapi.yaml +++ b/tests/fixtures/json_validation/openapi.yaml @@ -46,14 +46,14 @@ paths: foo: type: string responses: - 200: + '200': description: Success /user: get: operationId: fakeapi.hello.get_user responses: - 200: + '200': description: User object content: application/json: @@ -67,7 +67,7 @@ paths: schema: $ref: '#/components/schemas/User' responses: - 200: + '200': description: User object content: application/json: @@ -77,7 +77,7 @@ paths: get: operationId: fakeapi.hello.get_user_with_password responses: - 200: + '200': description: User object content: application/json: @@ -95,7 +95,7 @@ paths: nullable: true default: null responses: - 204: + '204': description: OK /multipart_form_json: @@ -114,7 +114,7 @@ paths: x: contentType: "application/json" responses: - 200: + '200': description: Modified Echo content: application/json: @@ -140,7 +140,7 @@ paths: x: contentType: "application/json" responses: - 200: + '200': description: Modified Echo content: application/json: diff --git a/tests/fixtures/json_validation/swagger.yaml b/tests/fixtures/json_validation/swagger.yaml index d50ac43b7..df2b66f39 100644 --- a/tests/fixtures/json_validation/swagger.yaml +++ b/tests/fixtures/json_validation/swagger.yaml @@ -37,14 +37,14 @@ paths: foo: type: string responses: - 200: + '200': description: Success /user: get: operationId: fakeapi.hello.get_user responses: - 200: + '200': description: User object schema: $ref: '#/definitions/User' @@ -57,7 +57,7 @@ paths: schema: $ref: '#/definitions/User' responses: - 200: + '200': description: User object schema: $ref: '#/definitions/User' @@ -65,7 +65,7 @@ paths: get: operationId: fakeapi.hello.get_user_with_password responses: - 200: + '200': description: User object schema: $ref: '#/definitions/User' diff --git a/tests/fixtures/missing_implementation/swagger.yaml b/tests/fixtures/missing_implementation/swagger.yaml index 64d92b4e9..7285471bf 100644 --- a/tests/fixtures/missing_implementation/swagger.yaml +++ b/tests/fixtures/missing_implementation/swagger.yaml @@ -12,5 +12,5 @@ paths: summary: Operation function does not exist. operationId: api.this_function_does_not_exist responses: - 200: + '200': description: OK diff --git a/tests/fixtures/missing_op_id/swagger.yaml b/tests/fixtures/missing_op_id/swagger.yaml index b1a8afbd2..1de039bdd 100644 --- a/tests/fixtures/missing_op_id/swagger.yaml +++ b/tests/fixtures/missing_op_id/swagger.yaml @@ -11,7 +11,7 @@ paths: put: # operationId: XXX completely missing responses: - 200: + '200': description: greeting response schema: type: object diff --git a/tests/fixtures/module_does_not_exist/swagger.yaml b/tests/fixtures/module_does_not_exist/swagger.yaml index 9405c8b01..8eb76c210 100644 --- a/tests/fixtures/module_does_not_exist/swagger.yaml +++ b/tests/fixtures/module_does_not_exist/swagger.yaml @@ -17,5 +17,5 @@ paths: required: true type: string responses: - 200: + '200': description: OK diff --git a/tests/fixtures/module_not_implemented/swagger.yaml b/tests/fixtures/module_not_implemented/swagger.yaml index 4f3012989..158d0cc18 100644 --- a/tests/fixtures/module_not_implemented/swagger.yaml +++ b/tests/fixtures/module_not_implemented/swagger.yaml @@ -11,7 +11,7 @@ paths: get: operationId: no.module.or.function responses: - 200: + '200': description: greeting response schema: type: object diff --git a/tests/fixtures/multiple_yaml_same_basepath/swagger_greeting.yaml b/tests/fixtures/multiple_yaml_same_basepath/swagger_greeting.yaml index f3246b530..6a8e56590 100644 --- a/tests/fixtures/multiple_yaml_same_basepath/swagger_greeting.yaml +++ b/tests/fixtures/multiple_yaml_same_basepath/swagger_greeting.yaml @@ -13,7 +13,7 @@ paths: description: Generates a greeting message. operationId: fakeapi.hello.post_greeting responses: - 200: + '200': description: greeting response schema: type: object diff --git a/tests/fixtures/op_error_api/swagger.yaml b/tests/fixtures/op_error_api/swagger.yaml index 3478952be..b3daa2980 100644 --- a/tests/fixtures/op_error_api/swagger.yaml +++ b/tests/fixtures/op_error_api/swagger.yaml @@ -11,7 +11,7 @@ paths: get: operationId: fakeapi.module_with_error.something responses: - 200: + '200': description: greeting response schema: type: object diff --git a/tests/fixtures/problem/openapi.yaml b/tests/fixtures/problem/openapi.yaml index 3bc02cd0f..87b778705 100644 --- a/tests/fixtures/problem/openapi.yaml +++ b/tests/fixtures/problem/openapi.yaml @@ -89,7 +89,7 @@ paths: schema: type: object responses: - 200: + '200': description: OK servers: - url: /v1.0 diff --git a/tests/fixtures/problem/swagger.yaml b/tests/fixtures/problem/swagger.yaml index c4e0f2b4a..dfcb57739 100644 --- a/tests/fixtures/problem/swagger.yaml +++ b/tests/fixtures/problem/swagger.yaml @@ -22,7 +22,7 @@ paths: description: Generates a greeting message. operationId: fakeapi.hello.post_greeting responses: - 200: + '200': description: greeting response schema: type: object @@ -41,7 +41,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: goodbye response schema: type: string @@ -54,7 +54,7 @@ paths: produces: - application/json responses: - 200: + '200': description: goodbye response schema: type: string @@ -67,7 +67,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: goodbye response schema: type: string @@ -79,7 +79,7 @@ paths: produces: - application/json responses: - 200: + '200': description: Never happens /customized_problem_response: @@ -89,7 +89,7 @@ paths: produces: - application/json responses: - 200: + '200': description: Custom problem response /problem_exception_with_extra_args: @@ -99,7 +99,7 @@ paths: produces: - application/json responses: - 200: + '200': description: Problem exception /post_wrong_content_type: @@ -115,5 +115,5 @@ paths: schema: type: object responses: - 200: + '200': description: OK diff --git a/tests/fixtures/secure_api/swagger.yaml b/tests/fixtures/secure_api/swagger.yaml index c424760d8..2b0de63a7 100644 --- a/tests/fixtures/secure_api/swagger.yaml +++ b/tests/fixtures/secure_api/swagger.yaml @@ -30,7 +30,7 @@ paths: description: Generates a greeting message. operationId: fakeapi.hello.post_greeting responses: - 200: + '200': description: greeting response schema: type: object @@ -48,7 +48,7 @@ paths: description: Generates a greeting message. operationId: fakeapi.hello.post_greeting_basic responses: - 200: + '200': description: greeting response schema: type: object diff --git a/tests/fixtures/secure_endpoint/swagger.yaml b/tests/fixtures/secure_endpoint/swagger.yaml index 6a6ef4db8..a2bf82812 100644 --- a/tests/fixtures/secure_endpoint/swagger.yaml +++ b/tests/fixtures/secure_endpoint/swagger.yaml @@ -53,7 +53,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: goodbye response schema: type: string @@ -75,7 +75,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: goodbye response schema: type: string @@ -91,7 +91,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: goodbye response schema: type: string @@ -107,7 +107,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: goodbye response schema: type: string @@ -128,7 +128,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: goodbye response schema: type: string @@ -149,7 +149,7 @@ paths: - myscope - api_key: [] responses: - 200: + '200': description: OK /more-than-one-scope: @@ -166,7 +166,7 @@ paths: produces: - text/plain responses: - 200: + '200': description: some response /optional-auth: @@ -205,5 +205,5 @@ paths: security: - api_key_query: [] responses: - 200: + '200': description: OK diff --git a/tests/fixtures/simple/openapi.yaml b/tests/fixtures/simple/openapi.yaml index e183a1cb9..8ea742c86 100644 --- a/tests/fixtures/simple/openapi.yaml +++ b/tests/fixtures/simple/openapi.yaml @@ -406,7 +406,7 @@ paths: style: form explode: false responses: - 200: + '200': description: OK /test_array_pipes_form_param: @@ -429,7 +429,7 @@ paths: items: style: pipeDelimited responses: - 200: + '200': description: OK /test_array_csv_query_param: @@ -1314,13 +1314,13 @@ paths: get: operationId: fakeapi.hello.async_route responses: - 200: + '200': description: 'OK' /httpstatus: get: operationId: fakeapi.hello.httpstatus responses: - 201: + '201': description: "happy path" default: description: "default" diff --git a/tests/fixtures/simple/swagger.yaml b/tests/fixtures/simple/swagger.yaml index ccb384748..38a90f7a6 100644 --- a/tests/fixtures/simple/swagger.yaml +++ b/tests/fixtures/simple/swagger.yaml @@ -93,7 +93,7 @@ paths: produces: - application/json responses: - 200: + '200': description: json response schema: type: object @@ -106,7 +106,7 @@ paths: produces: - application/json responses: - 200: + '200': description: a greeting in a list schema: type: array @@ -123,7 +123,7 @@ paths: get: operationId: fakeapi.hello.test_no_content_response responses: - 204: + '204': description: No content returned /multimime: @@ -135,7 +135,7 @@ paths: - application/json - application/xml responses: - 200: + '200': description: goodbye response schema: type: string @@ -148,7 +148,7 @@ paths: produces: - application/json responses: - 204: + '204': description: empty /test-redirect-endpoint: @@ -156,7 +156,7 @@ paths: summary: Tests handlers returning flask.Response objects operationId: fakeapi.hello.test_redirect_endpoint responses: - 302: + '302': description: 302 Found /test-redirect-response-endpoint: @@ -164,7 +164,7 @@ paths: summary: Tests handlers returning flask.Response objects operationId: fakeapi.hello.test_redirect_response_endpoint responses: - 302: + '302': description: 302 Found /test-default-object-body: @@ -179,7 +179,7 @@ paths: default: 'image_version': 'default_image' responses: - 200: + '200': description: OK /test-required-body: @@ -193,7 +193,7 @@ paths: schema: type: object responses: - 200: + '200': description: OK /test-default-integer-body: @@ -209,7 +209,7 @@ paths: example: 1 default: 1 responses: - 200: + '200': description: OK /test-empty-object-body: @@ -222,7 +222,7 @@ paths: schema: type: object responses: - 200: + '200': description: OK /resolver-test/method: @@ -230,7 +230,7 @@ paths: summary: Test class instance method operationId: fakeapi.hello.class_instance.test_method responses: - 200: + '200': description: OK /resolver-test/classmethod: @@ -238,7 +238,7 @@ paths: summary: Test class instance method operationId: fakeapi.hello.DummyClass.test_classmethod responses: - 200: + '200': description: OK /test_parameter_validation: @@ -256,7 +256,7 @@ paths: in: query type: boolean responses: - 200: + '200': description: OK /test_required_query_param: @@ -268,7 +268,7 @@ paths: type: number required: true responses: - 200: + '200': description: OK /test_array_csv_form_param: @@ -286,7 +286,7 @@ paths: collectionFormat: csv default: ["squash", "banana"] responses: - 200: + '200': description: OK /test_array_pipes_form_param: @@ -303,7 +303,7 @@ paths: type: integer collectionFormat: pipes responses: - 200: + '200': description: OK /test_array_csv_query_param: @@ -319,7 +319,7 @@ paths: collectionFormat: csv default: ["squash", "banana"] responses: - 200: + '200': description: OK /test_array_multi_query_param: @@ -334,7 +334,7 @@ paths: type: string collectionFormat: multi responses: - 200: + '200': description: OK /test_array_pipes_query_param: @@ -350,7 +350,7 @@ paths: type: integer collectionFormat: pipes responses: - 200: + '200': description: OK /test_array_unsupported_query_param: @@ -366,7 +366,7 @@ paths: type: string collectionFormat: tsv responses: - 200: + '200': description: OK /test-int-path/{someint}: @@ -379,7 +379,7 @@ paths: type: integer required: true responses: - 200: + '200': description: OK /test-float-path/{somefloat}: @@ -392,7 +392,7 @@ paths: type: number required: true responses: - 200: + '200': description: OK /test-float-path/{somefloat}/{someotherfloat}: @@ -409,7 +409,7 @@ paths: type: number required: true responses: - 200: + '200': description: O /test-default-query-parameter: @@ -422,7 +422,7 @@ paths: type: string default: connexion responses: - 200: + '200': description: OK /test-falsy-param: @@ -435,7 +435,7 @@ paths: in: query default: 1 responses: - 200: + '200': description: OK /test-formData-param: @@ -450,7 +450,7 @@ paths: in: formData required: true responses: - 200: + '200': description: OK /test-formData-missing-param: @@ -465,7 +465,7 @@ paths: in: formData required: true responses: - 200: + '200': description: OK /test-formData-file-upload: @@ -480,7 +480,7 @@ paths: in: formData required: true responses: - 200: + '200': description: OK /test-formData-multiple-file-upload: @@ -498,7 +498,7 @@ paths: in: formData required: true responses: - 200: + '200': description: OK /test-mixed-formData: @@ -517,7 +517,7 @@ paths: in: formData required: true responses: - 200: + '200': description: OK /test-formData-file-upload-missing-param: @@ -532,7 +532,7 @@ paths: in: formData required: true responses: - 200: + '200': description: OK /test-bool-param: @@ -545,7 +545,7 @@ paths: in: query default: false responses: - 200: + '200': description: OK /test-bool-array-param: @@ -559,7 +559,7 @@ paths: items: type: boolean responses: - 200: + '200': description: OK /test-required-param: @@ -572,7 +572,7 @@ paths: in: query required: true responses: - 200: + '200': description: OK /test-cookie-param: @@ -581,7 +581,7 @@ paths: operationId: fakeapi.hello.test_cookie_param # No parameters because swagger / openapi 2.0 does not support describing cookie parameters. responses: - 200: + '200': description: OK /parameters-in-root-path: @@ -595,10 +595,10 @@ paths: summary: Test the method GET with parameter from path operationId: fakeapi.hello.path_parameters_in_get_method responses: - 200: + '200': description: Everything is OK responses: - 200: + '200': description: OK /goodday/{name}: @@ -607,7 +607,7 @@ paths: description: Generates a good day message. operationId: fakeapi.hello.post_goodday responses: - 201: + '201': description: gooday response headers: Location: @@ -630,7 +630,7 @@ paths: produces: - text/plain responses: - 201: + '201': description: goodevening response headers: Location: @@ -650,7 +650,7 @@ paths: summary: Tests that response code 204 can have headers set operationId: fakeapi.hello.test_204_with_headers responses: - 204: + '204': headers: X-Something: description: A value that might be send in the response @@ -662,7 +662,7 @@ paths: summary: Tests that response code 204 using NoContent obj can have headers set operationId: fakeapi.hello.test_nocontent_obj_with_headers responses: - 204: + '204': headers: X-Something: description: A value that might be send in the response @@ -684,7 +684,7 @@ paths: required: true collectionFormat: csv responses: - 200: + '200': description: OK schema: type: array @@ -707,7 +707,7 @@ paths: x-nullable: true required: true responses: - 200: + '200': description: OK put: operationId: fakeapi.hello.test_nullable_param_put @@ -725,7 +725,7 @@ paths: name: type: string responses: - 200: + '200': description: OK get: operationId: fakeapi.hello.test_nullable_parameters @@ -740,7 +740,7 @@ paths: x-nullable: true required: true responses: - 200: + '200': description: OK /nullable-parameters-noargs: @@ -760,7 +760,7 @@ paths: name: type: string responses: - 200: + '200': description: OK /custom-json-response: @@ -769,7 +769,7 @@ paths: produces: - application/json responses: - 200: + '200': description: OK schema: type: object @@ -784,7 +784,7 @@ paths: produces: - "application/octet-stream" responses: - 200: + '200': description: Some blob response schema: type: string @@ -796,7 +796,7 @@ paths: produces: - "application/octet-stream" responses: - 200: + '200': description: Everything is ok schema: type: string @@ -812,7 +812,7 @@ paths: in: query type: string responses: - 200: + '200': description: Return kwargs schema: type: object @@ -836,7 +836,7 @@ paths: type: string additionalProperties: true responses: - 200: + '200': description: Return kwargs schema: type: object @@ -854,7 +854,7 @@ paths: schema: type: string responses: - 200: + '200': description: OK /param-sanitization: @@ -874,7 +874,7 @@ paths: in: formData type: string responses: - 200: + '200': description: Return parameters schema: type: object @@ -899,7 +899,7 @@ paths: body2: type: string responses: - 200: + '200': description: OK /body-sanitization-additional-properties: @@ -921,7 +921,7 @@ paths: type: string additionalProperties: true responses: - 200: + '200': description: OK /body-sanitization-additional-properties-defined: @@ -944,7 +944,7 @@ paths: additionalProperties: type: string responses: - 200: + '200': description: OK /body-not-allowed-additional-properties: @@ -966,7 +966,7 @@ paths: type: string additionalProperties: false responses: - 200: + '200': description: OK /body-in-get-request: @@ -987,14 +987,14 @@ paths: body1: type: string responses: - 200: + '200': description: OK /get_non_conforming_response: get: operationId: fakeapi.hello.get_empty_dict responses: - 200: + '200': description: OK schema: type: object @@ -1021,9 +1021,9 @@ paths: body2: type: string responses: - 200: + '200': description: OK - 215: + '215': description: NOT-OK /get_unicode_request: @@ -1035,7 +1035,7 @@ paths: in: query type: string responses: - 200: + '200': description: OK /get_unicode_response: @@ -1044,7 +1044,7 @@ paths: produces: - "application/json" responses: - 200: + '200': description: Some unicode response schema: type: object @@ -1055,7 +1055,7 @@ paths: produces: - "application/json" responses: - 200: + '200': description: Some HTTPStatus response schema: type: object @@ -1066,7 +1066,7 @@ paths: produces: - "application/json" responses: - 200: + '200': description: Some HTTPStatus response schema: type: object @@ -1082,7 +1082,7 @@ paths: type: integer required: true responses: - 200: + '200': description: Some object response schema: type: object @@ -1107,7 +1107,7 @@ paths: schema: type: object responses: - 200: + '200': description: > The response containing the same data as were present in request body. schema: @@ -1126,7 +1126,7 @@ paths: get: operationId: fakeapi.hello.async_route responses: - 200: + '200': description: 'OK' definitions: diff --git a/tests/fixtures/unordered_definition/swagger.yaml b/tests/fixtures/unordered_definition/swagger.yaml index d6e1d70ef..9462ce5e5 100644 --- a/tests/fixtures/unordered_definition/swagger.yaml +++ b/tests/fixtures/unordered_definition/swagger.yaml @@ -12,7 +12,7 @@ paths: summary: Mixed parameters in swagger definition operationId: fakeapi.hello.unordered_params_response responses: - 200: + '200': description: OK parameters: - name: first diff --git a/tests/fixtures/user_module_loading_error/swagger.yaml b/tests/fixtures/user_module_loading_error/swagger.yaml index 25fa50142..0f7f3fd4a 100644 --- a/tests/fixtures/user_module_loading_error/swagger.yaml +++ b/tests/fixtures/user_module_loading_error/swagger.yaml @@ -11,7 +11,7 @@ paths: get: operationId: fakeapi.module_with_exception.something responses: - 200: + '200': description: greeting response schema: type: object