You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openapi: 3.0.0info:
title:
description: Model training and querying utilities.contact:
name:
license:
name: BSDversion: '0.1'servers:
- url: 'https://localhost:5000'paths:
/people:
get:
summary: Retrieves one or more peopleresponses:
'200':
description: An array of peoplecontent:
application/json:
schema:
$ref: '#/components/schemas/People'default:
$ref: '#/components/responses/error'parameters:
- nulltags:
- Peoplepost:
summary: Stores one or more peoplerequestBody:
$ref: '#/components/requestBodies/People'responses:
'201':
description: operation has been successfuldefault:
$ref: '#/components/responses/error'parameters:
- nulltags:
- Peopledelete:
summary: Deletes all peopleresponses:
'204':
description: operation has been successfuldefault:
$ref: '#/components/responses/error'parameters:
- nulltags:
- People'/people/{peopleId}':
get:
summary: Retrieves a People documentresponses:
'200':
description: People document fetched successfullycontent:
application/json:
schema:
$ref: '#/components/schemas/People'default:
$ref: '#/components/responses/error'parameters:
- $ref: '#/components/parameters/People__id'
- nulltags:
- Peopleput:
summary: Replaces a People documentresponses:
'200':
description: People document replaced successfullydefault:
$ref: '#/components/responses/error'requestBody:
$ref: '#/components/requestBodies/People'parameters:
- $ref: '#/components/parameters/People__id'
- $ref: '#/components/parameters/ifMatch'
- nulltags:
- Peoplepatch:
summary: Updates a People documentresponses:
'200':
description: People document updated successfullydefault:
$ref: '#/components/responses/error'requestBody:
$ref: '#/components/requestBodies/People'parameters:
- $ref: '#/components/parameters/People__id'
- $ref: '#/components/parameters/ifMatch'
- nulltags:
- Peopledelete:
summary: Deletes a People documentresponses:
'204':
description: People document deleted successfullydefault:
$ref: '#/components/responses/error'parameters:
- $ref: '#/components/parameters/People__id'
- $ref: '#/components/parameters/ifMatch'
- nulltags:
- People'/people/{peopleId}/related':
get:
summary: 'Retrieves one or more people/{peopleId}/related'responses:
'200':
description: 'An array of people/{peopleId}/related'content:
application/json:
schema:
$ref: '#/components/schemas/Sub_resource'default:
$ref: '#/components/responses/error'parameters:
- $ref: '#/components/parameters/People__id'tags:
- Sub_resourcepost:
summary: 'Stores one or more people/{peopleId}/related'requestBody:
$ref: '#/components/requestBodies/Sub_resource'responses:
'201':
description: operation has been successfuldefault:
$ref: '#/components/responses/error'parameters:
- $ref: '#/components/parameters/People__id'tags:
- Sub_resourcedelete:
summary: 'Deletes all people/{peopleId}/related'responses:
'204':
description: operation has been successfuldefault:
$ref: '#/components/responses/error'parameters:
- $ref: '#/components/parameters/People__id'tags:
- Sub_resource'/people/{peopleId}/related/{sub_resourceId}':
get:
summary: Retrieves a Sub_resource documentresponses:
'200':
description: Sub_resource document fetched successfullycontent:
application/json:
schema:
$ref: '#/components/schemas/Sub_resource'default:
$ref: '#/components/responses/error'parameters:
- $ref: '#/components/parameters/Sub_resource__id'
- $ref: '#/components/parameters/People__id'tags:
- Sub_resourceput:
summary: Replaces a Sub_resource documentresponses:
'200':
description: Sub_resource document replaced successfullydefault:
$ref: '#/components/responses/error'requestBody:
$ref: '#/components/requestBodies/Sub_resource'parameters:
- $ref: '#/components/parameters/Sub_resource__id'
- $ref: '#/components/parameters/ifMatch'
- $ref: '#/components/parameters/People__id'tags:
- Sub_resourcepatch:
summary: Updates a Sub_resource documentresponses:
'200':
description: Sub_resource document updated successfullydefault:
$ref: '#/components/responses/error'requestBody:
$ref: '#/components/requestBodies/Sub_resource'parameters:
- $ref: '#/components/parameters/Sub_resource__id'
- $ref: '#/components/parameters/ifMatch'
- $ref: '#/components/parameters/People__id'tags:
- Sub_resourcedelete:
summary: Deletes a Sub_resource documentresponses:
'204':
description: Sub_resource document deleted successfullydefault:
$ref: '#/components/responses/error'parameters:
- $ref: '#/components/parameters/Sub_resource__id'
- $ref: '#/components/parameters/ifMatch'
- $ref: '#/components/parameters/People__id'tags:
- Sub_resourcecomponents:
schemas:
People:
type: objectproperties:
name:
description: the last name of the personexample: Doetype: stringjob:
$ref: '#/components/schemas/People_job'email:
pattern: ^.+@.+$type: stringposition:
readOnly: truetype: stringrelations:
type: arrayitems:
type: objectproperties:
relation_type:
type: stringrelation:
$ref: '#/components/schemas/People__id'required:
- relation_typelocation:
type: objectproperties:
type:
enum:
- Pointtype: stringcoordinates:
minItems: 2maxItems: 2type: arrayitems:
type: integerrequired:
- type
- coordinates_id:
$ref: '#/components/schemas/People__id'required:
- name
- job
- emaildescription: the people resourceSub_resource:
type: objectproperties:
peopleId:
$ref: '#/components/schemas/People__id'subject:
type: string_id:
type: stringformat: objectiddescription: A sub resource to test regex urls.People__id:
type: stringformat: objectidPeople_job:
description: the job of the persontype: stringError:
type: objectproperties:
_status:
type: integer_error:
type: objectproperties:
code:
type: integermessage:
type: stringrequired:
- _status
- _errorresponses:
error:
description: An error messagecontent:
application/json:
schema:
$ref: '#/components/schemas/Error'parameters:
People__id:
in: pathname: peopleIdrequired: truedescription: ''example: ''schema:
type: stringSub_resource__id:
in: pathname: sub_resourceIdrequired: truedescription: ''example: ''schema:
type: stringifMatch:
in: headername: If-Matchdescription: Current value of the _etag fieldrequired: trueschema:
type: stringexamples:
People:
summary: 'An example {0} document.'description: >- An example for People documents request bodies. Used in POST, PUT, PATCH methods.Sub_resource:
summary: 'An example {0} document.'description: >- An example for Sub_resource documents request bodies. Used in POST, PUT, PATCH methods.value:
subject: A note from some person.requestBodies:
People:
description: A People or list of People documentsrequired: truecontent:
application/json:
schema:
$ref: '#/components/schemas/People'examples:
People:
$ref: '#/components/examples/People'Sub_resource:
description: A Sub_resource document.required: truecontent:
application/json:
schema:
$ref: '#/components/schemas/Sub_resource'examples:
Sub_resource:
$ref: '#/components/examples/Sub_resource'securitySchemes:
oAuth2:
type: oauth2description: >- This API uses OAuth 2 with the implicit grant flow. [More info](https://api.example.com/docs/auth)flows:
password:
tokenUrl: 'https://localhost:5000/oauth/token'scopes: {}security:
- oAuth2: []tags:
- name: Peopledescription: the people resource
- name: Sub_resourcedescription: A sub resource to test regex urls.
Describe the bug you're encountering
The Sub_resource should show the custom resource example in the 'Example Value' of the requestBody, instead it always shows the example built from the schema property. This is visible as well in Swagger Editor.
The text was updated successfully, but these errors were encountered:
Q&A
Content & configuration
Describe the bug you're encountering
The Sub_resource should show the custom resource example in the 'Example Value' of the requestBody, instead it always shows the example built from the schema property. This is visible as well in Swagger Editor.
The text was updated successfully, but these errors were encountered: