New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for Consuming generated code #15
Documentation for Consuming generated code #15
Conversation
In some cases we may need to add headers to our requests. They can be added to a base configuration. Note that the original configuration will not be mutated, but a copy will be created with the new appended headers. We can use the following methods: | ||
*/ | ||
let configWithHeaders1 = baseConfig.appending(headers: ["Accept": "application/json"]) | ||
let configWithHeaders2 = baseConfig.appendingHeader(value: "application/json", forKey: "Accept") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let configWithHeaders2 = baseConfig.appendingHeader(value: "application/json", forKey: "Accept") | |
let configWithHeaders2 = baseConfig.appendingHeader(value: "application/json", forKey: "Accept") | |
let configWithHeaders3 = baseConfig.appending(contentType: .json) |
|
||
## Inline data types | ||
|
||
In order to have a proper generation, you need to define data models in the `components` section in OpenAPI, or in the `definitions` section in Swagger. Defining your data models inline can result in generated code that is not properly named and therefore difficult to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nested models: inline nested models are not supported - you need to define the nested model as a ref to components
or definitions
section.
|
||
Nevertheless, Bow OpenAPI has some other limitations. | ||
|
||
## Inline data types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add information about encoding
for body parameters - it is always being done with JSON encoder.
Documentation for integration in Xcode
This PR includes documentation for the following pages: