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
Hello.
Sorry for my stupid questions, you already tired of them.
But such limited documentation is hard to figure out.
I want to split requests and responses models to different folders.
For example, I have request in YAML:
paths:
/content/city:
post:
summary: Find citydescription: Find city in specific country by query stringtags:
- Contentresponses:
'200':
description: OKcontent:
application/json:
schema:
$ref: '#/components/schemas/City'requestBody:
$ref: '#/components/requestBodies/Location'
{% for temp in raw.components.requestBodies %}
//
{{ raw.components.requestBodies[temp].content['application/json'].schema }}
{% endfor %}
But it is very bad solution. What I doing incorrect?
How I can access to components/requestBodies schema properties and type as well as components/schemas properties and type? What "context" is correct in template.yml file for this?
The text was updated successfully, but these errors were encountered:
requestBodies isn't currently provided as a top level property for the template to use. Request bodies are a new thing in Swagger 3, and adding it as a stencil context, slipped under the radar. It can be added here, if you'd like to open a PR
Hello.
Sorry for my stupid questions, you already tired of them.
But such limited documentation is hard to figure out.
I want to split requests and responses models to different folders.
For example, I have request in YAML:
and components:
And in template I have rules:
Responses models is OK. But I dont have requests models (zero files in Sources/Models/Request/).
I found, that requestBodies is resolving in https://github.com/yonaskolb/SwagGen/blob/77586ddd462635e5fe3ce0eacdec8c7a9aee8443/Sources/Swagger/Component/ComponentResolver.swift (25 and 27 lines is duplicated).
I try comment "context" and send raw in ModelRequest.swift and in .stencil file I can found requests properties:
But it is very bad solution. What I doing incorrect?
How I can access to components/requestBodies schema properties and type as well as components/schemas properties and type? What "context" is correct in template.yml file for this?
The text was updated successfully, but these errors were encountered: