API stability of the generator
Understand the impact of updating the generator package plugin on the generated Swift code.
Overview
Swift OpenAPI Generator generates client and server Swift code from an OpenAPI document. The generated code may change if the OpenAPI document is changed or a different version of the generator is used.
This document outlines the API stability goals for the generator to help you avoid unintentional build errors when updating to a new version of Swift OpenAPI Generator.
Swift OpenAPI Generator follows Semantic Versioning 2.0.0 for the following, which are considered part of its API:
The name of the Swift OpenAPI Generator package plugin.
The format of the config file provided to Swift OpenAPI Generator (plugin or CLI tool).
The Swift OpenAPI Generator CLI tool arguments, options, and flags.
If you upgrade any of the components above to the next non-breaking version, your project should continue to build successfully. Check out how these rules are applied, and what a breaking change means for the generated code: API stability of generated code.
Implementation details
In contrast to the guarantees provided for the API of Swift OpenAPI Generator, the following list of behaviors are not considered API, and can change without prior warning:
The number and names of files generated by the Swift OpenAPI Generator CLI and plugins.
The SPI provided by the OpenAPIRuntime library used by generated code (marked with
@_spi(Generated)
).The business logic of the generated code, any code that isn’t part of the API of the generated code.
The diagnostics emitted by the generator, both their severity and printed description.
See Also
API stability of generated code
Understand the impact of changes to the OpenAPI document on generated Swift code.
Read More