Skip to content

Commit 666ea16

Browse files
authored
[Docs] Clarify that number/names of generated files are not API + other polish (#450)
### Motivation The number and names of generated files should not be considered APIs, to allow us to introduce future optimization, such as #253. ### Modifications Clarified in the docs, also removed some pre-1.0 stuff, plus some other minor fixups. ### Result Clearer docs. ### Test Plan Previewed locally.
1 parent c716814 commit 666ea16

File tree

6 files changed

+19
-25
lines changed

6 files changed

+19
-25
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ Choose one of the transports listed below, or create your own by adopting the `C
3535

3636
| Generator versions | Supported OpenAPI versions | Minimum Swift version |
3737
| -------- | ------- | ----- |
38-
| `0.1.0` ... `0.1.11` | 3.0 | 5.8 |
39-
| `0.1.12` ... `0.3.5` | 3.0, 3.1 | 5.8 |
40-
| `1.0.0-alpha.1` ... `main` | 3.0, 3.1 | 5.9 |
38+
| `1.0.0` ... `main` | 3.0, 3.1 | 5.9 |
4139

4240
### Supported platforms and minimum versions
4341

Sources/swift-openapi-generator/Documentation.docc/Articles/API-stability-of-the-generator.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,25 @@ Swift OpenAPI Generator generates client and server Swift code from an OpenAPI d
88

99
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.
1010

11-
The components covered by these rules are:
12-
- the name of the Swift OpenAPI Generator package plugin
13-
- the format of the config file provided to Swift OpenAPI Generator (plugin or CLI tool)
14-
- the Swift OpenAPI Generator CLI tool arguments
11+
Swift OpenAPI Generator follows [Semantic Versioning 2.0.0][0] for the following, which are considered part of its API:
1512

16-
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 before 1.0 is released, and what a breaking change means for the generated code: <doc:API-stability-of-generated-code>.
13+
- The name of the Swift OpenAPI Generator package plugin.
14+
- The format of the config file provided to Swift OpenAPI Generator (plugin or CLI tool).
15+
- The Swift OpenAPI Generator CLI tool arguments, options, and flags.
1716

18-
### API stability for versions >= 1.0.0
17+
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: <doc:API-stability-of-generated-code>.
1918

20-
After the project reaches 1.0.0, we will follow [Semantic Versioning 2.0.0][0].
19+
### Implementation details
2120

22-
### API stability for versions 0.y.z
21+
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:
2322

24-
Swift OpenAPI Generator is being developed as an open source project. In order to accommodate feedback from the community, it does not yet have a 1.0.0 release. Until it does, we reserve the right to change the API between _minor_ versions (for example, between `0.2.0` and `0.3.0`), as described in the Semantic Version Specification[[1]][[2]].
25-
26-
> Tip: To avoid unexpected build issues, use `.upToNextMinor(from: "0.y.z")` in your `Package.swift` when declaring a dependency on Swift OpenAPI Generator packages (including the runtime and transport libraries).
23+
- The number and names of files generated by the Swift OpenAPI Generator CLI and plugins.
24+
- The SPI provided by the OpenAPIRuntime library used by generated code (marked with `@_spi(Generated)`).
25+
- The business logic of the generated code, any code that isn't part of the API of the generated code.
26+
- The diagnostics emitted by the generator, both their severity and printed description.
2727

2828
## See Also
2929

3030
- <doc:API-stability-of-generated-code>
3131

3232
[0]: https://semver.org
33-
[1]: https://semver.org/#spec-item-4
34-
[2]: https://semver.org/#how-should-i-deal-with-revisions-in-the-0yz-initial-development-phase

Sources/swift-openapi-generator/Documentation.docc/Articles/Contributing-to-Swift-OpenAPI-Generator.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ Let's walk through the steps to implement a missing OpenAPI feature that require
7272

7373
11. All done! Thank you for your contribution! 🙏
7474

75-
[0]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#fixed-fields-10
75+
[0]: https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields-10

Sources/swift-openapi-generator/Documentation.docc/Articles/Starting-with-an-example-project.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Starting with an example project
1+
# Checking out an example project
22

3-
Duplicate a working example to start your project.
3+
Check out a working example to learn how packages using Swift OpenAPI Generator can be structured and integrated with the ecosystem.
44

55
## Overview
66

7-
All the examples are self-contained, so you can copy the package directory of your chosen example and use it as a starter template for your project.
7+
All the examples are self-contained, so you can copy the package directory of your chosen example and run it independently.
88

99
### Getting started
1010

Sources/swift-openapi-generator/Documentation.docc/Articles/Supported-OpenAPI-features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Supported features are always provided on _both_ client and server.
1616

1717
For the checked serialization formats below, the generator emits types conforming to `Codable`, structured based on the provided JSON Schema.
1818

19-
For any other formats, the payload is provided as raw bytes, leaving it up to the adopter to decode as needed.
19+
For any other formats, the payload is provided as raw bytes (using the `HTTPBody` streaming body type), leaving it up to the adopter to decode as needed.
2020

2121
- [x] JSON
2222
- when content type is `application/json` or ends with `+json`

Sources/swift-openapi-generator/Documentation.docc/Swift-OpenAPI-Generator.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The code is generated at build-time, so it's always in sync with the OpenAPI doc
1616

1717
### Getting started
1818

19-
> Tip: In a rush? Duplicate a working example to start your project: <doc:Starting-with-an-example-project>.
19+
> Tip: In a rush? Check out a working example: <doc:Starting-with-an-example-project>.
2020
2121
Alternatively, to integrate Swift OpenAPI Generator into your existing project, or to create a new one, follow one of our _getting started_ guides:
2222
- <doc:ClientXcode>
@@ -50,9 +50,7 @@ Choose one of the transports listed below, or create your own by adopting the `C
5050

5151
| Generator versions | Supported OpenAPI versions | Minimum Swift version |
5252
| -------- | ------- | ----- |
53-
| `0.1.0` ... `0.1.11` | 3.0 | 5.8 |
54-
| `0.1.12` ... `0.3.5` | 3.0, 3.1 | 5.8 |
55-
| `1.0.0-alpha.1` ... `main` | 3.0, 3.1 | 5.9 |
53+
| `1.0.0` ... `main` | 3.0, 3.1 | 5.9 |
5654

5755
See also <doc:Supported-OpenAPI-features>.
5856

0 commit comments

Comments
 (0)