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: dev-tools/openapi-manager/README.adoc
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,8 +92,7 @@ If in doubt, look at an existing versioned API crate (e.g., `dns-server-api/src/
92
92
**For both lockstep and versioned APIs:** once the API crate is defined, update the OpenAPI manager to manage the new OpenAPI document(s). Within this directory:
93
93
94
94
. In `Cargo.toml`, add a dependency on the API crate.
95
-
// XXX-dap-last-step this will need an update
96
-
. In `src/spec.rs`, add the crate to the `all_apis` function. (Please keep the list sorted by filename.) For versioned crates, you'll use the `supported_versions()` function defined by the `api_versions!` macro. Again, use one of the existing examples as a guide.
95
+
. In `src/omicron.rs`, add the crate to the `all_apis` function. (Please keep the list sorted by filename.) For versioned crates, you'll use the `supported_versions()` function defined by the `api_versions!` macro. Again, use one of the existing examples as a guide.
97
96
98
97
To ensure everything works well, run `cargo xtask openapi generate`. Your
99
98
OpenAPI document should be generated on disk and listed in the output.
@@ -264,8 +263,7 @@ An existing lockstep API can be made versioned. You would do this when transiti
264
263
. Run `git rm -f openapi/dns-server.json`.
265
264
. Run `mkdir openapi/dns-server`.
266
265
. Update the API crate (`dns-server-api/src/lib.rs`) to use the new `api_versions!` macro. See the instructions under <<_adding_new_openapi_documents>> above.
267
-
// XXX-dap-last-step
268
-
. Update the OpenAPI manager configuration in `src/spec.rs` (in this directory) to specify that the API is now versioned. You'll use the `supported_versions()` function defined by the `api_versions!` macro.
266
+
. Update the OpenAPI manager configuration in `src/omicron.rs` (in this directory) to specify that the API is now versioned. You'll use the `supported_versions()` function defined by the `api_versions!` macro.
269
267
. Run `cargo xtask openapi generate`. This will generate a new file under `openapi/dns-server` for your initial server version, along with a "latest" symlink.
0 commit comments