...
The success responses Ok and No Content still would have the sample response irrespective of the API, hence these could still be included in the global components section. But as the response body would be different for different APIs while returning status code 200, this should be defined along with the API and should not be global. We could define the response body schema under the schema' section in global properties.
Code Block |
---|
|
expand | title | Anchor Schema sample |
---|
collapse | true |
---|
|
schemas:
AnchorDetails:
type: object
title: Anchor details by anchor Name
properties:
name:
type: string
example: Anchor_1
dataspaceName:
type: string
example: Dataspace_1
schemaSetName:
type: string
example: Schema_set_1 |
Code Block |
---|
language | yml |
---|
title | Array of anchors schema |
---|
collapse | true |
---|
|
ArrayOfAnchors:
type: array
items:
type: object
properties:
name:
type: string
example: my_anchor
dataspace:
type: string
example: my_dataspace
schemaSet:
type: string
example: my-schema-set |
Expand |
---|
title | Array of Anchor schema sample |
---|
|
ArrayOfAnchors: type: array items: type: object properties: name: type: string example: my_anchor dataspace: type: string example: my_dataspace schemaSet: type: string example: my-schema-set |