Skip to content

Commit ea1a1db

Browse files
authored
Add a proposal state for when merged behind a feature flag (#161)
Add a proposal state for when merged behind a feature flag ### Motivation When introducing breaking changes, it can be convenient to hide the new behavior behind a feature flag. However, up until now, proposals didn't have a state that represents "feature landed but is not enabled by default yet". ### Modifications This PR introduces a new state for proposals for this. Also, added missing documentation for the `featureFlags` key in the config file. ### Result Now proposals can be moved to the new state before their feature is enabled unconditionally. ### Test Plan N/A Reviewed by: simonjbeaumont Builds: ✔︎ pull request validation (5.8) - Build finished. ✔︎ pull request validation (5.9) - Build finished. ✔︎ pull request validation (docc test) - Build finished. ✔︎ pull request validation (integration test) - Build finished. ✔︎ pull request validation (nightly) - Build finished. ✔︎ pull request validation (soundness) - Build finished. #161
1 parent bf49be1 commit ea1a1db

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Sources/swift-openapi-generator/Documentation.docc/Articles/Configuring-the-generator.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ The configuration file has the following keys:
3030
- `types`: Common types and abstractions used by generated client and server code.
3131
- `client`: Client code that can be used with any client transport (depends on code from `types`).
3232
- `server`: Server code that can be used with any server transport (depends on code from `types`).
33-
- `additionalImports` (optional): array of strings. Each string value Swift module name. An import statement will be added to the generated source files for each module.
33+
- `additionalImports` (optional): array of strings. Each string value is a Swift module name. An import statement will be added to the generated source files for each module.
34+
- `featureFlags` (optional): array of strings. Each string must be a valid feature flag to enable. For a list of currently supported feature flags, check out [FeatureFlags.swift](https://github.com/apple/swift-openapi-generator/blob/main/Sources/_OpenAPIGeneratorCore/FeatureFlags.swift).
3435

3536
### Example config files
3637

Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ While it's encouraged to get feedback by opening a pull request with a proposal
2020
4. Open a pull request with your proposal and solicit feedback from other contributors.
2121
5. Once a maintainer confirms that the proposal is ready for review, the state is updated accordingly. The review period is 7 days, and ends when one of the maintainers marks the proposal as Ready for Implementation, or Deferred.
2222
6. Before the pull request is merged, there should be an implementation ready, either in the same pull request, or a separate one, linked from the proposal.
23-
7. The proposal is considered Approved once the implementation and proposal PRs have been merged.
23+
7. The proposal is considered Approved once the implementation, proposal PRs have been merged, and, if originally disabled by a feature flag, feature flag enabled unconditionally.
2424

2525
If you have any questions, tag [Honza Dvorsky](https://github.com/czechboy0) or [Si Beaumont](https://github.com/simonjbeaumont) in your issue or pull request on GitHub.
2626

@@ -29,6 +29,7 @@ If you have any questions, tag [Honza Dvorsky](https://github.com/czechboy0) or
2929
- Awaiting Review
3030
- In Review
3131
- Ready for Implementation
32+
- In Preview
3233
- Approved
3334
- Deferred
3435

Sources/swift-openapi-generator/Documentation.docc/Proposals/SOAR-NNNN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Feature name (template proposal)
1010
- Issue: [apple/swift-openapi-generator#1](https://github.com/apple/swift-openapi-generator/issues/1)
1111
- Implementation:
1212
- [apple/swift-openapi-generator#1](https://github.com/apple/swift-openapi-generator/pull/1)
13+
- Feature flag: `proposalNNNN`
1314
- Affected components:
1415
- generator
1516
- runtime

0 commit comments

Comments
 (0)