Example Swagger/OpenAPI definition:
openapi: 3.0.1
info:
title: API Docs
version: '1.0'
description: 'Docs'
paths:
/api/v1/tools/lnft:
get:
summary: Calculate LNFT
tags:
- Tools
description: 'description'
operationId: LNFT
parameters:
- in: query
name: filter
content:
application/json: # <---- media type indicates how to serialize / deserialize the parameter content
schema:
type: object
properties:
type:
type: string
color:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CalculateLNFT'
application/xml:
schema:
$ref: '#/components/schemas/CalculateLNFT'
xml:
name: data
'400':
description: Bad Request -- Validation failed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/Error'
xml:
name: data
'401':
description: Authorization Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/Error'
xml:
name: data
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
application/xml:
schema:
$ref: '#/components/schemas/Error'
xml:
name: data
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Error:
type: object
properties:
error:
type: object
properties:
code:
type: integer
description: HTTP Code
message:
type: string
description: Error Description
CalculateLNFT:
type: object
properties:
data:
type: object
properties:
results:
type: object
properties:
LNFT:
type: float
descritpion: Linear feet value
example: 7.08
Trucks:
type: integer
description: Number of Trucks necessary for load
example: 2
Remarks:
type: string
description: Remarks
example: string
message:
type: string
description: Extra Info
security:
- bearerAuth: []
servers:
- url: /framework
Unable to render query string parameter when using 'content' instead of schema. I'm using 'content' because my query string is a json string, as stated in the example.
Steps to reproduce the behavior:
parameters:
- in: query
name: filter
content:
application/json: # <---- media type indicates how to serialize / deserialize the parameter content
schema:
type: object
properties:
type:
type: string
color:
type: string
(complete yaml above)
Input is rendered
Thanks for the report! This issue is tracked in #4442.
Closing as a duplicate of #4442 馃槃
The solution to the problem : "馃槺 Could not render this component, see the console." in Swagger Open API 3 can be resolved by following the link: https://swagger.io/docs/specification/describing-parameters/
sorry, this issue was resolved??