You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/dropshot-api-manager/README.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,8 @@ For more information about API traits, see [Oxide RFD 479](https://rfd.shared.ox
9
9
>
10
10
> *[Enable developer mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development#activate-developer-mode), which allows non-administrators to create symlinks.
11
11
> * Run `git config --global core.symlinks true`.
12
-
> * Disable CRLF conversions within Git by checking in a `.gitattributes` file with:
12
+
>
13
+
> Also, disable CRLF conversions within Git by checking in a `.gitattributes` file with:
13
14
>
14
15
> ```
15
16
> # Disable CRLF conversions on Windows.
@@ -238,7 +239,20 @@ For much more on this, see [RFD 532 "Versioning for internal HTTP APIs"](https:/
238
239
239
240
For a versioned API, the set of all supported versions is defined by the `api_versions!` macroin the APIcrate.More precisely:in configuring the OpenAPI manager tool to know about a versioned API, you use the `supported_versions()` function defined by the macro.**This is critical: the OpenAPI documents in the `openapi` directory are _not_ the source of truth about what versions are supported.TheRust `api_versions!` call is.**
240
241
241
-
Each of these supported versions is either **blessed** (meaning it's been committed-to -- i.e., shipped, or potentially deployed on a system that we care about upgrading smoothly) or **locally-added**.Currently, blessed versions are not allowed to change _at all_.In the near future, we hope to relax this a bit so that they can be changed in ways that are provably compatible (e.g., doc changes).
242
+
Each of these supported versions is either **blessed** (meaning it's been committed-to -- i.e., shipped, or potentially deployed on a system that we care about upgrading smoothly) or **locally-added**.Blessed versions are only allowed to change in provably wire-compatible ways.
243
+
244
+
Changes**allowed**in blessed versions include:
245
+
246
+
*Documentation updates
247
+
*Renaming types while keeping the overall structure the same
When you run `cargo openapi check` or `cargo openapi generate`, the tool loads OpenAPI documents from three sources:
244
258
@@ -248,7 +262,7 @@ When you run `cargo openapi check` or `cargo openapi generate`, the tool loads O
248
262
249
263
Putting all this together, the tool is pretty straightforward.For each supported version of a versioned API:
250
264
251
-
*If there is a blessed file for that version, then the version is blessed.The generated file must exactly match the blessed one.Ifnot, the tool cannot fix this.You have to undo whatever changes you made that affected the blessed version. (See above on how to make changes to the APItrait without affecting older versions.)
265
+
*If there is a blessed file for that version, then the version is blessed.The generated file must match the blessed one (up to wire-compatibility).Ifthey don't, the tool cannot fix this.You have to undo whatever changes you made that affected the blessed version. (See above on how to make changes to the APItrait without affecting older versions.)
252
266
*If there is no blessed file for that version, then the version is locally-added.There should be exactly one local file for it and it should exactly match the generated file.The tool can fix any problems here by removing all local files and generating a new one based on the generated one.
253
267
*The tool also ensures that a "latest" symlink exists and points to the highest-numbered OpenAPI document.
0 commit comments