Skip to content

Commit 64b199d

Browse files
authored
[Proposal] Add a lightweight proposal process (#49)
[Proposal] Add a lightweight proposal process ### Motivation To ensure that we include all the important considerations for every non-trivial API change, and solicit feedback in a consistent way, let's introduce a lightweight proposal process based on Swift evolution. ### Modifications Added a template and a Proposals page that lists them all, plus linked to it from the relevant doc pages. ### Result Contributors will be able to just duplicate the template and fill in their proposal. ### Test Plan Previewed docs locally and verified the navigation works. Reviewed by: simonjbeaumont Builds: ✔︎ pull request validation (5.8) - Build finished. ✔︎ pull request validation (5.9) - Build finished. ✔︎ pull request validation (nightly) - Build finished. ✔︎ pull request validation (soundness) - Build finished. #49
1 parent 6583f18 commit 64b199d

File tree

4 files changed

+104
-0
lines changed

4 files changed

+104
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ The generated Swift code depends on the runtime library, so some features might
2424

2525
Similarly, any changes to the transport and middleware protocols in the runtime library must consider the impact on existing existing transport and middleware implementation packages.
2626

27+
> Tip: For non-trivial changes affecting the API, consider writing a proposal. For more, check out <doc:Proposals>.
28+
2729
### Testing the generator
2830

2931
The generator relies on a mix of unit and integration tests.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Proposals
2+
3+
Collaborate on API changes to Swift OpenAPI Generator by writing a proposal.
4+
5+
## Overview
6+
7+
For non-trivial changes that affect the public API, the Swift OpenAPI Generator project adopts a ligthweight version of the [Swift Evolution](https://github.com/apple/swift-evolution/blob/main/process.md) process.
8+
9+
Writing a proposal first helps discuss multiple possible solutions early, apply useful feedback from other contributors, and avoid reimplementing the same feature multiple times.
10+
11+
While it's encouraged to get feedback by opening a pull request with a proposal early in the process, it's also important to consider the complexity of the implementation when evaluating different solutions (as per <doc:Project-scope-and-goals>). For example, this might mean including a prototype implementation of the feature in the same PR as the proposal document.
12+
13+
> Note: The goal of this process is to help solicit feedback from the whole community around the project, and we will continue to refine the proposal process itself. Use your best judgement, and don't hesitate to propose changes to the proposal structure itself!
14+
15+
### Steps
16+
17+
1. Make sure there's a GitHub issue for the feature or change you would like to propose.
18+
2. Duplicate the `SOAR-NNNN.md` document and replace `NNNN` with the next available proposal number.
19+
3. Link the GitHub issue from your proposal, and fill in the proposal.
20+
4. Open a pull request with your proposal and solicit feedback from other contributors.
21+
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.
22+
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.
24+
25+
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.
26+
27+
### Possible review states
28+
29+
- Awaiting Review
30+
- In Review
31+
- Ready for Implementation
32+
- Approved
33+
- Deferred
34+
35+
### Possible affected components
36+
37+
- generator
38+
- runtime
39+
- client transports
40+
- server transports
41+
42+
## Topics
43+
44+
- <doc:SOAR-NNNN>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SOAR-NNNN
2+
3+
Feature name (template proposal)
4+
5+
## Overview
6+
7+
- Proposal: SOAR-NNNN
8+
- Author(s): [Author 1](https://github.com/swiftdev), [Author 2](https://github.com/swiftdev)
9+
- Status: **Awaiting Review**
10+
- Issue: [apple/swift-openapi-generator#1](https://github.com/apple/swift-openapi-generator/issues/1)
11+
- Implementation:
12+
- [apple/swift-openapi-generator#1](https://github.com/apple/swift-openapi-generator/pull/1)
13+
- Affected components:
14+
- generator
15+
- runtime
16+
- client transports
17+
- server transports
18+
- Related links:
19+
- [Swift Evolution](https://www.swift.org/swift-evolution/)
20+
21+
### Introduction
22+
23+
A short, one-sentence overview of the feature or change.
24+
25+
### Motivation
26+
27+
Describe the problems that this proposal aims to address, and what workarounds adopters have to employ currently, if any.
28+
29+
### Proposed solution
30+
31+
Describe your solution to the problem. Provide examples and describe how they work. Show how your solution is better than current workarounds.
32+
33+
This section should focus on what will change for the _adopters_ of Swift OpenAPI Generator.
34+
35+
### Detailed design
36+
37+
Describe the implementation of the feature, a link to a prototype implementation is encouraged here.
38+
39+
This section should focus on what will change for the _contributors_ to Swift OpenAPI Generator.
40+
41+
### API stability
42+
43+
Discuss the API implications, making sure to considering all of:
44+
- runtime public API
45+
- runtime "Generated" SPI
46+
- existing transport and middleware implementations
47+
- generator implementation affected by runtime API changes
48+
- generator API (config file, CLI, plugin)
49+
- existing and new generated adopter code
50+
51+
### Future directions
52+
53+
Discuss any potential future improvements to the feature.
54+
55+
### Alternatives considered
56+
57+
Discuss the alternative solutions considered, even during the review process itself.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ The generated code, runtime library, and transports are supported on more platfo
7575
### Getting involved
7676
- <doc:Project-scope-and-goals>
7777
- <doc:Contributing-to-Swift-OpenAPI-Generator>
78+
- <doc:Proposals>
7879

7980
[openapi]: https://openapis.org
8081
[tools]: https://openapi.tools

0 commit comments

Comments
 (0)