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.3info:
title: Example appdescription: This is an exampleversion: 1.0.0servers:
- url: https://dev.app.com/appApplicationNamedescription: DEVpaths:
/documents:
post:
description: > The structure of the *metadata* property should conform to the schema defined in the [ModelPostDocumentInvoice](#/components/schemas/ModelPostDocumentInvoice) schema outlined at the bottom of this page. summary: Multipart/form-data with json object property + filerequestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/ModelPostDocumentInvoiceCombineModelFile'operationId: test2responses:
'200':
description: okcontent:
application/json:
schema:
type: stringdescription: okcomponents:
schemas:
ModelFile:
type: objectproperties:
file:
type: stringformat: binaryrequired:
- fileAbstractModelPostDocument:
type: objectproperties:
title:
type: stringdefault: ''maxLength: 64example: MyDocument.pdf'description: Displayed title. Can be different than filenamecategory:
type: stringenum:
- Invoice
- Receipt
- Credit note
- Purchase OrderdocumentDate:
type: stringdescription: >- Creation date of the document. Example : For ID card, it is the issuing date of the card.format: daterequired:
- title
- category
- documentDateModelPostDocumentInvoice:
allOf:
- $ref: '#/components/schemas/AbstractModelPostDocument'
- type: objectproperties:
amount:
type: numberexample: 1234.56description: Invoice Amountdescription: Metadata for invoice documentsrequired:
- amountModelPostDocumentOneOf:
oneOf:
- $ref: '#/components/schemas/ModelPostDocumentInvoice'ModelPostDocumentInvoiceCombineModelFile:
allOf:
- $ref: '#/components/schemas/ModelFile'
- type: objectproperties:
metadata:
$ref: '#/components/schemas/ModelPostDocumentInvoice'description: metadatarequired:
- metadataModelPostDocumentOneOfCombineModelFile:
allOf:
- $ref: '#/components/schemas/ModelFile'
- type: objectproperties:
metadata:
$ref: '#/components/schemas/ModelPostDocumentOneOf'required:
- metadata
Is your feature request related to a problem?
In the example provided the 'metadata' which is an object property property is defined using a schema.
After clicking on 'Try it out' an example based on this schema is displayed, however the schema is not displayed in Swagger UI.
Consequently :
As API provider I have to provide a link in description to inform consummer that the json for the property should follow the schema
As API consumer I have to scroll down to the bottom of the OAS definition to display the schema.
Describe the solution you'd like
With the impovement, for each obect property, the user is allowed to choose between 'Example value' and 'Schema'
Describe alternatives you've considered
Current solution : Add link to the schema in endpoint's description
Additional context
The purpose of this endpoint is to offer a versatile method for uploading files and associated metadata of various types. The set of metadata required depends on the nature of the file, such as Invoicing or Identification documents (see Schemas for examples).
Content & configuration
Swagger/OpenAPI definition:
Is your feature request related to a problem?
In the example provided the 'metadata' which is an object property property is defined using a schema.
After clicking on 'Try it out' an example based on this schema is displayed, however the schema is not displayed in Swagger UI.
Consequently :
As API provider I have to provide a link in description to inform consummer that the json for the property should follow the schema
As API consumer I have to scroll down to the bottom of the OAS definition to display the schema.
Describe the solution you'd like
With the impovement, for each obect property, the user is allowed to choose between 'Example value' and 'Schema'
Describe alternatives you've considered
Current solution : Add link to the schema in endpoint's description
Additional context
The purpose of this endpoint is to offer a versatile method for uploading files and associated metadata of various types. The set of metadata required depends on the nature of the file, such as Invoicing or Identification documents (see Schemas for examples).
Related issues :
-> Is asking to show a preview of the payload (an example) without clicking on "Try it out"
-> Is asking the same as this one but for query parameters
-> Same as 4581
The text was updated successfully, but these errors were encountered: