Ask a Question

Error rendering output

SOLVED
HenrikHL
Contributor

Error rendering output

Dear SmartBear,

I have the following API: https://app.swaggerhub.com/apis/dcsaorg/DCSA_EBL/2.0.0#/Shipping%20Instructions/put_v2_shipping_inst...

With a PUT definition that does not render correctly (neither for schema nor example). Here is a screenDump:

HenrikHL_2-1641679421709.png

The problem is that the request body does not contain a "shippingInstructionID" field. The object defining this can bee seen here:

HenrikHL_1-1641679391680.png

The above is taken from this domain (linked to from the API mentioned above): https://app.swaggerhub.com/domains/dcsaorg/DOCUMENTATION_DOMAIN/2.0.0#/components/schemas/shippingIn...

 

Exporting the API and importing it in ReDoc renders it correctly!

docker run -it --rm -p 80:80 \
> -e SPEC_URL='https://api.swaggerhub.com/apis/dcsaorg/DCSA_EBL/2.0.0?resolved=true' redocly/redoc

 Here is a screenDump if object being displayed correctly:

HenrikHL_3-1641679663611.png

Please let me know if I am doing something wrong on SwaggerHub. 

2 REPLIES 2
mhiggins
Staff

Load the domain schema $ref into the local components>schemas section and then use a local $ref in the PUT. 

——-
Micheál Higgins
Senior Solutions Architect
m: micheal.higgins@smartbear.com

Hi @mhiggins,

It appears that the reason this was not working was because the shippingInstructionID was marked as readOnly and thus not visible in the request - sorry for the confusion - it is working now

cancel
Showing results for 
Search instead for 
Did you mean: