Swagger: Rename Spec to Preferences (#78226)

The definition for preferences is globally named `Spec` because that's the type that cue outputs
This adds a swagger annotation to rename the definition in the swagger schema to `Preferences`
This will be easier to use in generated clients
This commit is contained in:
Julien Duchesne
2023-12-04 09:51:09 -05:00
committed by GitHub
parent 2fb207ba13
commit 637cfa89be
7 changed files with 117 additions and 101 deletions

View File

@ -21,7 +21,7 @@ The user or team frontend preferences
| Property | Type | Required | Default | Description |
|------------|---------------------|----------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `metadata` | [object](#metadata) | **Yes** | | metadata contains embedded CommonMetadata and can be extended with custom string fields<br/>TODO: use CommonMetadata instead of redefining here; currently needs to be defined here<br/>without external reference as using the CommonMetadata reference breaks thema codegen. |
| `spec` | [object](#spec) | **Yes** | | |
| `spec` | [object](#spec) | **Yes** | | Spec defines user, team or org Grafana preferences<br/>swagger:model Preferences |
| `status` | [object](#status) | **Yes** | | |
### Metadata
@ -69,6 +69,9 @@ extraFields is reserved for any fields that are pulled from the API server metad
### Spec
Spec defines user, team or org Grafana preferences
swagger:model Preferences
| Property | Type | Required | Default | Description |
|---------------------|---------------------------------------------------|----------|---------|---------------------------------------------------------------------------------|
| `cookiePreferences` | [CookiePreferences](#cookiepreferences) | No | | |