Skip to content

[dpd-api] add an openapi-lint-clean API version - #418

Merged
sunshowers merged 1 commit into
mainfrom
jj-stack/dpd-api-add-an-openapi-lint-clean-api-version-mnykwnzo
Nov 9, 2026
Merged

sunshowers merged 1 commit into
mainfrom
jj-stack/dpd-api-add-an-openapi-lint-clean-api-version-mnykwnzo

Conversation

@sunshowers

Copy link
Copy Markdown
Contributor

Going to add openapi-lint to the next commit. Fix up some lint issues identified by it. In the newly added version:

  • Enum values and object properties are snake_case (for example, PortSpeed::Speed100G is "speed100_g", and PortFec::RS is "rs").
  • LinkState and IpSrc are adjacently tagged.
  • FecRSCounters and LinkFecRSCounters are renamed to FecRsCounters and LinkFecRsCounters, respectively.
  • The NAT address lists return NatIpv4Address and NatIpv6Address objects ({"address": ...}) rather than bare addresses, matching how omicron pages over named item types. A page of bare addresses is named after the std type's schema (ipv4ResultsPage), which isn't PascalCase.
  • Path components are kebab-case.
  • nat_trigger_update returns 204 No Content instead of a JSON null.

The on-disk port config keeps its existing format by using the v13 LinkCreate to do parsing with.

Going to add openapi-lint to the next commit. Fix up some lint issues
identified by it. In the newly added version:

* Enum values and object properties are snake_case (for example,
  `PortSpeed::Speed100G` is "speed100_g", and `PortFec::RS` is "rs").
* `LinkState` and `IpSrc` are adjacently tagged.
* `FecRSCounters` and `LinkFecRSCounters` are renamed to `FecRsCounters` and
  `LinkFecRsCounters`, respectively.
* The NAT address lists return `NatIpv4Address` and `NatIpv6Address` objects
  (`{"address": ...}`) rather than bare addresses, matching how omicron pages
  over named item types. A page of bare addresses is named after the std type's
  schema (`ipv4ResultsPage`), which isn't PascalCase.
* Path components are kebab-case.
* `nat_trigger_update` returns 204 No Content instead of a JSON null.

The on-disk port config keeps its existing format by using the v13
LinkCreate to do parsing with.
@@ -495,10 +495,10 @@
"content": {
"application/json": {
"schema": {
"title": "Array_of_LinkFecRSCounters",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it's outside of scope here to paginate or fake paginate

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah probably a followup if we'd like to do that.

@sunshowers
sunshowers merged commit 61c086f into main Nov 9, 2026
10 checks passed
@sunshowers
sunshowers deleted the jj-stack/dpd-api-add-an-openapi-lint-clean-api-version-mnykwnzo branch November 9, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants