swift-openapi-generator
swift-openapi-generator copied to clipboard
Generate Swift client and server code from an OpenAPI document.
Support external JSON references to allow breaking up a large doc into smaller ones. "External" can mean either: 1. another file on local disk 2. a remote file To start,...
We have an OpenAPI spec that contains wildcard content types, especially for non-200 responses: ``` "404" : { "content" : { "*/*" : { "schema" : { "type" : "object"...
I got the following error in the build transcript: ``` Showing All Messages Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "The given data was not valid YAML.", underlyingError: Optional(19:3: error: scanner: while scanning...
The generator skips the default values for Components.Schemas. It would be nice to have a default value for the property itself and in the initializer. I made an example: Spec...
For simplicity, initially the type holding the raw request and response body data is `Foundation.Data`, but that prevents use cases where large amounts of data need to be sent/received if...
Using an Open API file that has a parameter with `explode: false` results in a warning of ``` Feature "Unexploded query params" is not supported, skipping [context: foundIn=Operations.launcher_list.Input.Query (#/paths/2.2.0/launcher/GET/query)/launcher_config__ids] ```...
OpenAPI 3.0.x doesn't support adding descriptions to object properties, only to schemas. That's not a problem when the schema is an inline one, as the description of the inline schema...
Creating input types is quite verbose because they contain multiple nested enums. (e.g. `.ok(.init(headers: .init(), body: .json(...)))`). It may be useful to generate static helper functions on the output type...
For example, the GitHub API uses flavors of the `application/json` content type: `application/vnd.github+json`. Details: https://docs.github.com/en/rest/overview/media-types?apiVersion=2022-11-28 We should add a test case for it, as I suspect we might have some...
There is some existing support as part of parameters, but we should add an example into the reference test, and ensure the usage is ergonomic. https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-locations