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
I tried to write reusable requests (post, put etc.) inside swagger.js file (just like default definitions) and use them inside yml file.
The problem is the schema related to each route is different and since the the request is defined in swagger config and used in yml many times, I cannot find a way to dynamically use related schema inside the body of each request. this is my request in yml:
/admin/order:
post:
tags:
- "Order"
summary: "my summary"
$ref: "#/reusables/post"
And this is the way I defined POST method in swagger.js file:
I tried to write reusable requests (post, put etc.) inside swagger.js file (just like default definitions) and use them inside yml file.
The problem is the schema related to each route is different and since the the request is defined in swagger config and used in yml many times, I cannot find a way to dynamically use related schema inside the body of each request. this is my request in yml:
And this is the way I defined POST method in swagger.js file:
Is there any way I could write a request once and use multiple times for different routes?
The text was updated successfully, but these errors were encountered: