From f37e17923f72b91f4b20cf38d6c139ad266477f0 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Wed, 2 Aug 2023 07:58:11 +0200 Subject: [PATCH 1/3] Add a proposal state for when merged behind a feature flag --- .../Documentation.docc/Articles/Configuring-the-generator.md | 3 ++- .../Documentation.docc/Proposals/Proposals.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Sources/swift-openapi-generator/Documentation.docc/Articles/Configuring-the-generator.md b/Sources/swift-openapi-generator/Documentation.docc/Articles/Configuring-the-generator.md index 94623ddb..bfeca37a 100644 --- a/Sources/swift-openapi-generator/Documentation.docc/Articles/Configuring-the-generator.md +++ b/Sources/swift-openapi-generator/Documentation.docc/Articles/Configuring-the-generator.md @@ -30,7 +30,8 @@ The configuration file has the following keys: - `types`: Common types and abstractions used by generated client and server code. - `client`: Client code that can be used with any client transport (depends on code from `types`). - `server`: Server code that can be used with any server transport (depends on code from `types`). -- `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. +- `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. +- `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). ### Example config files diff --git a/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md b/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md index 8332700b..532981ee 100644 --- a/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md +++ b/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md @@ -20,7 +20,7 @@ While it's encouraged to get feedback by opening a pull request with a proposal 4. Open a pull request with your proposal and solicit feedback from other contributors. 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. 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. -7. The proposal is considered Approved once the implementation and proposal PRs have been merged. +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. 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. @@ -29,6 +29,7 @@ If you have any questions, tag [Honza Dvorsky](https://github.com/czechboy0) or - Awaiting Review - In Review - Ready for Implementation +- Merged behind a Feature Flag - Approved - Deferred From 2d113aba4ca7fc3a2b342a224bb819dfada50be0 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Wed, 2 Aug 2023 08:14:14 +0200 Subject: [PATCH 2/3] Added a field for feature flags in the proposal template --- .../Documentation.docc/Proposals/SOAR-NNNN.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/swift-openapi-generator/Documentation.docc/Proposals/SOAR-NNNN.md b/Sources/swift-openapi-generator/Documentation.docc/Proposals/SOAR-NNNN.md index 664c0c4f..113fe6ea 100644 --- a/Sources/swift-openapi-generator/Documentation.docc/Proposals/SOAR-NNNN.md +++ b/Sources/swift-openapi-generator/Documentation.docc/Proposals/SOAR-NNNN.md @@ -10,6 +10,7 @@ Feature name (template proposal) - Issue: [apple/swift-openapi-generator#1](https://github.com/apple/swift-openapi-generator/issues/1) - Implementation: - [apple/swift-openapi-generator#1](https://github.com/apple/swift-openapi-generator/pull/1) +- Feature flag: `proposalNNNN` - Affected components: - generator - runtime From 94094a02da359dada035f5fada64f0f1fd5c3894 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Wed, 2 Aug 2023 08:56:19 +0200 Subject: [PATCH 3/3] s/Merged behind a Feature Flag/In Preview --- .../Documentation.docc/Proposals/Proposals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md b/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md index 532981ee..c902dbb8 100644 --- a/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md +++ b/Sources/swift-openapi-generator/Documentation.docc/Proposals/Proposals.md @@ -29,7 +29,7 @@ If you have any questions, tag [Honza Dvorsky](https://github.com/czechboy0) or - Awaiting Review - In Review - Ready for Implementation -- Merged behind a Feature Flag +- In Preview - Approved - Deferred