fix
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
openapi: "3.0.0"
|
||||
|
||||
|
||||
paths:
|
||||
/:
|
||||
get:
|
||||
parameters:
|
||||
- name: users
|
||||
in: query
|
||||
description: List of users to query for
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
- userId: 1
|
||||
currency: USD
|
||||
- userId: 2
|
||||
currency: CAD
|
||||
schema:
|
||||
$ref: "#/components/schemas/UserArray"
|
||||
responses:
|
||||
200:
|
||||
description: OK!
|
||||
components:
|
||||
schemas:
|
||||
|
||||
UserArray:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/User"
|
||||
|
||||
User:
|
||||
type: object
|
||||
required:
|
||||
- userId
|
||||
- currency
|
||||
properties:
|
||||
userId:
|
||||
type: integer
|
||||
format: int32
|
||||
currency:
|
||||
type: string
|
||||
@@ -0,0 +1,47 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Demo API
|
||||
description: First test
|
||||
termsOfService: 'http://demo.io/terms-of-service/'
|
||||
contact:
|
||||
name: Demo Support
|
||||
email: support@demo.io
|
||||
version: 1.0.0
|
||||
|
||||
paths:
|
||||
/4641_1:
|
||||
get:
|
||||
summary: Returns a 200
|
||||
security:
|
||||
- api_key_1: []
|
||||
responses:
|
||||
'200':
|
||||
description: A 200
|
||||
content:
|
||||
application/text:
|
||||
schema:
|
||||
type: string
|
||||
/4641_2:
|
||||
get:
|
||||
summary: Returns a 200
|
||||
security:
|
||||
- api_key_1: []
|
||||
- api_key_2: []
|
||||
responses:
|
||||
'200':
|
||||
description: A 200
|
||||
content:
|
||||
application/text:
|
||||
schema:
|
||||
type: string
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
api_key_1:
|
||||
type: apiKey
|
||||
name: api_key_1
|
||||
in: header
|
||||
api_key_2:
|
||||
type: apiKey
|
||||
name: api_key_2
|
||||
in: header
|
||||
@@ -0,0 +1,12 @@
|
||||
openapi: "3.0.0"
|
||||
|
||||
paths:
|
||||
/some/route:
|
||||
post:
|
||||
description: This should be visible
|
||||
tags:
|
||||
- Some
|
||||
requestBody: {}
|
||||
responses:
|
||||
'200':
|
||||
description: Description
|
||||
@@ -0,0 +1,24 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: test
|
||||
version: "0.1"
|
||||
paths:
|
||||
/test:
|
||||
post:
|
||||
operationId: myOp
|
||||
responses:
|
||||
default:
|
||||
description: ok
|
||||
callbacks:
|
||||
subscription:
|
||||
http://$request.query.url:
|
||||
post:
|
||||
description: myCallback
|
||||
parameters:
|
||||
- name: myParam
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
default:
|
||||
description: ok
|
||||
@@ -0,0 +1,43 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
description: Test API
|
||||
version: v1
|
||||
title: Test API
|
||||
tags:
|
||||
- name: Test
|
||||
description: Test API
|
||||
servers:
|
||||
- url: /v1
|
||||
paths:
|
||||
/test:
|
||||
post:
|
||||
tags:
|
||||
- Test
|
||||
summary: Test endpoint
|
||||
description: Test
|
||||
operationId: postTest
|
||||
responses:
|
||||
'200':
|
||||
description: Returns response
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/test'
|
||||
components:
|
||||
schemas:
|
||||
test:
|
||||
type: object
|
||||
properties:
|
||||
a:
|
||||
type: string
|
||||
b:
|
||||
type: integer
|
||||
c:
|
||||
oneOf:
|
||||
- type: object
|
||||
- type: array
|
||||
items:
|
||||
type: string
|
||||
- type: boolean
|
||||
- type: integer
|
||||
- type: number
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
paths:
|
||||
findByStatus:
|
||||
get:
|
||||
tags:
|
||||
- "pet"
|
||||
summary: "Finds Pets by status"
|
||||
description: "Multiple status values can be provided with comma separated strings"
|
||||
operationId: "findPetsByStatus"
|
||||
parameters:
|
||||
- name: "status"
|
||||
in: "body"
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
@@ -0,0 +1,44 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
|
||||
version: "1.0.0"
|
||||
title: "Swagger Petstore"
|
||||
termsOfService: "http://swagger.io/terms/"
|
||||
contact:
|
||||
email: "apiteam@swagger.io"
|
||||
license:
|
||||
name: "Apache 2.0"
|
||||
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
host: "petstore.swagger.io"
|
||||
basePath: "/v2"
|
||||
produces:
|
||||
- application/json
|
||||
- application/xml
|
||||
- text/csv
|
||||
consumes:
|
||||
- application/json
|
||||
- application/xml
|
||||
- text/csv
|
||||
schemes:
|
||||
- "https"
|
||||
- "http"
|
||||
paths:
|
||||
/pet:
|
||||
post:
|
||||
tags:
|
||||
- "pet"
|
||||
summary: "Add a new pet to the store"
|
||||
description: ""
|
||||
operationId: "addPet"
|
||||
parameters:
|
||||
- in: "body"
|
||||
name: "body"
|
||||
description: "Pet object that needs to be added to the store"
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/Pet"
|
||||
responses:
|
||||
405:
|
||||
description: "Invalid input"
|
||||
/pet/findByStatus:
|
||||
$ref: "status.yaml#/paths/findByStatus"
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
swagger: '2.0'
|
||||
info:
|
||||
title: Foobar Service
|
||||
description: '<br><p>Example of a simple GET request via curl with bearer HTTP Authentication:</p><pre>curl
|
||||
-X GET "https://foobar.com/stuff" -H "Accept: application/json" -H "Authorization:
|
||||
Bearer abc123.xyz.789"</pre>'
|
||||
version: '2.0'
|
||||
paths: {}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
openapi: "3.0.0"
|
||||
info:
|
||||
description: "A sample API for "
|
||||
version: "1.0.0"
|
||||
title: "Sample"
|
||||
contact:
|
||||
name: ""
|
||||
url: "http://website.com"
|
||||
email: "admin@mail.com"
|
||||
paths:
|
||||
/:
|
||||
post:
|
||||
summary: Create/modify object
|
||||
operationId: postObject
|
||||
parameters:
|
||||
- name: filterParams
|
||||
in: query
|
||||
description: Additional filter fields
|
||||
required: false
|
||||
schema:
|
||||
type: object
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Status message
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
@@ -0,0 +1,33 @@
|
||||
openapi: "3.0.0"
|
||||
info:
|
||||
description: "A sample API for "
|
||||
version: "1.0.0"
|
||||
title: "Sample"
|
||||
contact:
|
||||
name: ""
|
||||
url: "http://website.com"
|
||||
email: "admin@mail.com"
|
||||
paths:
|
||||
/:
|
||||
post:
|
||||
summary: Create/modify object
|
||||
operationId: postObject
|
||||
parameters:
|
||||
- name: filterParams
|
||||
in: query
|
||||
description: Additional filter fields
|
||||
required: false
|
||||
schema:
|
||||
type: object
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
type: object
|
||||
responses:
|
||||
'200':
|
||||
description: Status message
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
@@ -0,0 +1,26 @@
|
||||
openapi: "3.0.0"
|
||||
|
||||
paths:
|
||||
/aev:
|
||||
get:
|
||||
parameters:
|
||||
- name: param
|
||||
in: query
|
||||
allowEmptyValue: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
/aev/and/required:
|
||||
get:
|
||||
parameters:
|
||||
- name: param
|
||||
in: query
|
||||
allowEmptyValue: true
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
@@ -0,0 +1,23 @@
|
||||
openapi: "3.0.0"
|
||||
|
||||
paths:
|
||||
/:
|
||||
post:
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
first:
|
||||
type: object
|
||||
example:
|
||||
one: abc
|
||||
two: 123
|
||||
second:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
- "hi"
|
||||
@@ -0,0 +1,27 @@
|
||||
info:
|
||||
title: Required parameter missing, doesn't block request from executing.
|
||||
version: '1'
|
||||
openapi: 3.0.0
|
||||
servers:
|
||||
- url: http://httpbin.org/anything
|
||||
paths:
|
||||
/foos:
|
||||
post:
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
# application/json:
|
||||
# application/xml:
|
||||
schema:
|
||||
properties:
|
||||
foo:
|
||||
type: string
|
||||
bar:
|
||||
type: string
|
||||
required:
|
||||
- foo
|
||||
type: object
|
||||
required: true # Note this doesn't have an impact
|
||||
responses:
|
||||
default:
|
||||
description: ok
|
||||
@@ -0,0 +1,24 @@
|
||||
openapi: 3.0.0
|
||||
servers: []
|
||||
info:
|
||||
description: sdf
|
||||
version: "1.0.0"
|
||||
title: Swagger Petstore
|
||||
paths:
|
||||
/pet:
|
||||
get:
|
||||
tags:
|
||||
- default
|
||||
summary:
|
||||
whatever: 123
|
||||
operationId: objectSummary
|
||||
responses:
|
||||
'405':
|
||||
description: Invalid input
|
||||
post:
|
||||
tags:
|
||||
- default
|
||||
operationId: noSummary
|
||||
responses:
|
||||
'405':
|
||||
description: Invalid input
|
||||
@@ -0,0 +1,20 @@
|
||||
openapi: "3.0.0"
|
||||
info:
|
||||
title: Testcase API
|
||||
version: 2.0.0
|
||||
paths:
|
||||
'/endpoint':
|
||||
get:
|
||||
parameters:
|
||||
- name: type
|
||||
in: query
|
||||
example: fruit
|
||||
schema:
|
||||
type: string
|
||||
enum:
|
||||
- fruit
|
||||
- vegetable
|
||||
- drink
|
||||
responses:
|
||||
'200':
|
||||
description: 200 response
|
||||
@@ -0,0 +1,19 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
title: Testcase API
|
||||
version: 2.0.0
|
||||
paths:
|
||||
'/endpoint':
|
||||
get:
|
||||
parameters:
|
||||
- name: type
|
||||
in: query
|
||||
x-example: fruit
|
||||
type: string
|
||||
enum:
|
||||
- fruit
|
||||
- vegetable
|
||||
- drink
|
||||
responses:
|
||||
'200':
|
||||
description: 200 response
|
||||
@@ -0,0 +1,10 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: Response without a schema
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/foo:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -0,0 +1,25 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: test
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/foo:
|
||||
post:
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Foo'
|
||||
responses:
|
||||
201:
|
||||
description: Created
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Foo:
|
||||
type: object
|
||||
properties:
|
||||
foo:
|
||||
type: string
|
||||
example: bar
|
||||
@@ -0,0 +1,37 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
title: test
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/foo1:
|
||||
get:
|
||||
summary: Response without a schema
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
200:
|
||||
description: Successful response
|
||||
examples:
|
||||
application/json:
|
||||
foo: custom value
|
||||
/foo2:
|
||||
get:
|
||||
summary: Response with schema
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
200:
|
||||
description: Successful response
|
||||
schema:
|
||||
$ref: '#/definitions/Foo'
|
||||
examples:
|
||||
application/json:
|
||||
foo: custom value
|
||||
|
||||
definitions:
|
||||
Foo:
|
||||
type: object
|
||||
properties:
|
||||
foo:
|
||||
type: string
|
||||
example: bar
|
||||
@@ -0,0 +1,14 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: test
|
||||
description: Nullable model itself
|
||||
version: '1.0'
|
||||
paths: {}
|
||||
components:
|
||||
schemas:
|
||||
SomeObject:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
nullable: true
|
||||
@@ -0,0 +1,17 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: test
|
||||
description: Nullable object in model property
|
||||
version: '1.0'
|
||||
paths: {}
|
||||
components:
|
||||
schemas:
|
||||
SomeObject:
|
||||
type: object
|
||||
properties:
|
||||
meta:
|
||||
type: object
|
||||
properties:
|
||||
tag:
|
||||
type: string
|
||||
nullable: true
|
||||
@@ -0,0 +1,28 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
description: "OAS2 sample with entries as property name"
|
||||
version: "0.0.1"
|
||||
title: "Swagger Sample"
|
||||
paths:
|
||||
/pet:
|
||||
post:
|
||||
summary: "Add a new pet to the store"
|
||||
description: ""
|
||||
parameters:
|
||||
- in: "body"
|
||||
name: "body"
|
||||
schema:
|
||||
$ref: "#/definitions/Pet"
|
||||
responses:
|
||||
"405":
|
||||
description: "Invalid input"
|
||||
definitions:
|
||||
Pet:
|
||||
type: "object"
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
entries: # <-- evaluate
|
||||
type: "array"
|
||||
items:
|
||||
type: "string"
|
||||
@@ -0,0 +1,31 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: OAS 3.0 sample with entries as property name
|
||||
version: 0.1.0
|
||||
paths:
|
||||
/test/:
|
||||
get:
|
||||
summary: Test
|
||||
operationId: test_test__get
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Testmodel'
|
||||
components:
|
||||
schemas:
|
||||
Testmodel:
|
||||
title: Testmodel
|
||||
required:
|
||||
- name
|
||||
- entries
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
title: Name
|
||||
type: string
|
||||
entries:
|
||||
title: Entries
|
||||
type: integer
|
||||
@@ -0,0 +1,57 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: "Swagger Test"
|
||||
version: "1.0.0"
|
||||
servers:
|
||||
- url: https://api.example.com/v1
|
||||
paths:
|
||||
/users:
|
||||
get:
|
||||
tags:
|
||||
- User
|
||||
summary: Get Users
|
||||
responses:
|
||||
200:
|
||||
description: User List
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/User'
|
||||
post:
|
||||
tags:
|
||||
- User
|
||||
summary: Create a user
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
responses:
|
||||
201:
|
||||
description: Created successfully
|
||||
put:
|
||||
tags:
|
||||
- User
|
||||
summary: Update user
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
responses:
|
||||
201:
|
||||
description: Created successfully
|
||||
components:
|
||||
schemas:
|
||||
User:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
readOnly: true
|
||||
name:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
@@ -0,0 +1,37 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
title: Response headers test
|
||||
version: 1.0.0
|
||||
host: httpbin.org
|
||||
schemes: [https]
|
||||
paths:
|
||||
/response-headers:
|
||||
get:
|
||||
summary: Run the request using the default parameter values
|
||||
parameters:
|
||||
- in: query
|
||||
name: X-Header1
|
||||
type: string
|
||||
x-example: 'value1,value2'
|
||||
required: true
|
||||
- in: query
|
||||
name: X-Header2
|
||||
type: string
|
||||
x-example: 'value3, value4'
|
||||
required: true
|
||||
- in: query
|
||||
name: X-Header3
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
x-example: [value5, value6]
|
||||
collectionFormat: multi
|
||||
required: true
|
||||
- in: query
|
||||
name: Access-Control-Expose-Headers
|
||||
type: string
|
||||
x-example: 'X-Header1, X-Header2, X-Header3, Access-Control-Expose-Headers'
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
@@ -0,0 +1,13 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: OAS 3.0 sample with multiple servers
|
||||
version: 0.1.0
|
||||
servers:
|
||||
- url: http://testserver1.com
|
||||
- url: http://testserver2.com
|
||||
paths:
|
||||
/test/:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
description: "OAS 2.0 sample with Object Model deprecated: true"
|
||||
version: "0.0.1"
|
||||
title: "Swagger Sample"
|
||||
paths:
|
||||
/test/:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
definitions:
|
||||
IdentificationProfile:
|
||||
type: object
|
||||
deprecated: true
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
IDP2:
|
||||
type: array
|
||||
deprecated: true
|
||||
items:
|
||||
type: string
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
description: "OAS 2.0 sample with Object Model deprecated: true"
|
||||
version: "0.0.1"
|
||||
title: "Swagger Sample"
|
||||
paths:
|
||||
/test/:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
definitions:
|
||||
IdentificationProfile:
|
||||
type: object
|
||||
deprecated: false
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
IDP2:
|
||||
type: array
|
||||
deprecated: true
|
||||
items:
|
||||
type: string
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: "OAS 3.0 sample with Object Model deprecated: true"
|
||||
version: 0.1.0
|
||||
servers:
|
||||
- url: http://testserver1.com
|
||||
paths:
|
||||
/test/:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
components:
|
||||
schemas:
|
||||
IdentificationProfile:
|
||||
type: object
|
||||
deprecated: true
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
IDP2:
|
||||
type: array
|
||||
deprecated: true
|
||||
items:
|
||||
type: string
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: "OAS 3.0 sample with Object Model deprecated: true"
|
||||
version: 0.1.0
|
||||
servers:
|
||||
- url: http://testserver1.com
|
||||
paths:
|
||||
/test/:
|
||||
get:
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
components:
|
||||
schemas:
|
||||
IdentificationProfile:
|
||||
type: object
|
||||
deprecated: false
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
IDP2:
|
||||
type: array
|
||||
deprecated: true
|
||||
items:
|
||||
type: string
|
||||
@@ -0,0 +1,52 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Example Swagger
|
||||
version: '1.0'
|
||||
servers:
|
||||
- url: /api/v1
|
||||
paths:
|
||||
/xmlTest:
|
||||
get:
|
||||
summary: subscribes to a siri vm stream
|
||||
operationId: xmlTest
|
||||
parameters: []
|
||||
responses:
|
||||
'200':
|
||||
description: Simple example
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
type: object
|
||||
xml:
|
||||
name: root
|
||||
properties:
|
||||
x:
|
||||
type: string
|
||||
example:
|
||||
x: what the f
|
||||
examples:
|
||||
x2:
|
||||
summary: "xml not rendered via 'examples' keyword"
|
||||
value:
|
||||
x: should be xml
|
||||
/xmlTest2:
|
||||
get:
|
||||
summary: subscribes to a siri vm stream
|
||||
operationId: xmlTest2
|
||||
parameters: []
|
||||
responses:
|
||||
'200':
|
||||
description: Simple example
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
type: object
|
||||
xml:
|
||||
name: root
|
||||
properties:
|
||||
x:
|
||||
type: string
|
||||
example:
|
||||
x: what the f
|
||||
example:
|
||||
x: should be xml
|
||||
@@ -0,0 +1,57 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Example Swagger
|
||||
version: '1.0'
|
||||
servers:
|
||||
- url: /api/v1
|
||||
paths:
|
||||
/xmlTest/examples:
|
||||
post:
|
||||
summary: sample issues
|
||||
operationId: xmlTest_examples
|
||||
parameters: []
|
||||
requestBody:
|
||||
description: Simple Test xml examples
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Test"
|
||||
examples:
|
||||
test:
|
||||
value:
|
||||
x: should be xml
|
||||
responses:
|
||||
'200':
|
||||
description: Simple Test xml examples
|
||||
content: {}
|
||||
/xmlTest/example:
|
||||
post:
|
||||
summary: sample issues
|
||||
operationId: xmlTest_example
|
||||
parameters: []
|
||||
requestBody:
|
||||
description: Simple Test xml example
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Test"
|
||||
example:
|
||||
x: should be xml
|
||||
responses:
|
||||
'200':
|
||||
description: Simple Test xml example
|
||||
content: {}
|
||||
components:
|
||||
schemas:
|
||||
Test:
|
||||
type: object
|
||||
xml:
|
||||
name: root
|
||||
properties:
|
||||
x:
|
||||
type: string
|
||||
other:
|
||||
type: string
|
||||
format: email
|
||||
example:
|
||||
x: what the f
|
||||
@@ -0,0 +1,85 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
description: Test API
|
||||
version: v1
|
||||
title: Test API
|
||||
tags:
|
||||
- name: Test
|
||||
description: Test API
|
||||
servers:
|
||||
- url: /v1
|
||||
paths:
|
||||
/test:
|
||||
post:
|
||||
tags:
|
||||
- Test
|
||||
summary: Test endpoint
|
||||
description: Test
|
||||
operationId: postTest
|
||||
responses:
|
||||
'200':
|
||||
description: Returns response
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/test'
|
||||
components:
|
||||
schemas:
|
||||
test:
|
||||
type: object
|
||||
properties:
|
||||
a:
|
||||
type: string
|
||||
b:
|
||||
type: integer
|
||||
c:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Things'
|
||||
d:
|
||||
type: array
|
||||
items:
|
||||
anyOf:
|
||||
- $ref: '#/components/schemas/TextObject'
|
||||
- $ref: '#/components/schemas/ImageObject'
|
||||
|
||||
|
||||
Things:
|
||||
type: object
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/TextObject'
|
||||
- $ref: '#/components/schemas/ImageObject'
|
||||
|
||||
TextObject:
|
||||
required:
|
||||
- data
|
||||
type: object
|
||||
properties:
|
||||
objectType:
|
||||
type: string
|
||||
example: Text
|
||||
xml:
|
||||
name: ObjectType
|
||||
data:
|
||||
type: string
|
||||
example: This is a text
|
||||
xml:
|
||||
name: Data
|
||||
description: Contains a text
|
||||
|
||||
ImageObject:
|
||||
required:
|
||||
- data
|
||||
type: object
|
||||
properties:
|
||||
objectType:
|
||||
type: string
|
||||
example: image
|
||||
xml:
|
||||
name: ObjectType
|
||||
data:
|
||||
type: string
|
||||
example: This is a image
|
||||
xml:
|
||||
name: Data
|
||||
description: Contains a image
|
||||
@@ -0,0 +1,41 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: XML array schema with array-level example
|
||||
version: 1.0.0
|
||||
|
||||
paths:
|
||||
/users:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
description: ''
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Users'
|
||||
|
||||
components:
|
||||
schemas:
|
||||
Users:
|
||||
type: array
|
||||
example:
|
||||
- id: 123
|
||||
name: bob
|
||||
- id: 456
|
||||
name: jane
|
||||
xml:
|
||||
name: Users
|
||||
wrapped: true
|
||||
items:
|
||||
type: object
|
||||
xml:
|
||||
name: User
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
xml:
|
||||
attribute: true
|
||||
name:
|
||||
type: string
|
||||
xml:
|
||||
attribute: true
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
openapi: 3.0.2
|
||||
info:
|
||||
title: "This is an example highlighting a display issue related to `tags` and `description` entries therein. It contains tag descriptions with & without externalDocs."
|
||||
version: 1.0.0
|
||||
tags:
|
||||
- name: "foo"
|
||||
description: "Foo: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex\
|
||||
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
||||
externalDocs:
|
||||
description: "Find out more"
|
||||
url: "http://swagger.io"
|
||||
- name: "bar"
|
||||
description: "Bar: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex \
|
||||
ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
||||
- name: "baz"
|
||||
description: "Baz: has less description text"
|
||||
externalDocs:
|
||||
description: "Find out more about our store"
|
||||
url: "http://swagger.io"
|
||||
paths:
|
||||
/foobar:
|
||||
get:
|
||||
tags:
|
||||
- "foo"
|
||||
- "bar"
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
@@ -0,0 +1,28 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: Example Swagger with required default body parameter
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/pet:
|
||||
post:
|
||||
operationId: addPet
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BodyParameter'
|
||||
required: true
|
||||
responses:
|
||||
405:
|
||||
description: Invalid input
|
||||
content: {}
|
||||
components:
|
||||
schemas:
|
||||
BodyParameter:
|
||||
required:
|
||||
- bodyParameter
|
||||
type: object
|
||||
properties:
|
||||
bodyParameter:
|
||||
type: string
|
||||
default: default
|
||||
@@ -0,0 +1,13 @@
|
||||
swagger: "2.0"
|
||||
|
||||
paths:
|
||||
/:
|
||||
get:
|
||||
description: wow
|
||||
|
||||
definitions:
|
||||
MyModel:
|
||||
type: object
|
||||
properties:
|
||||
a:
|
||||
type: string
|
||||
Reference in New Issue
Block a user