diff --git a/contract/api-standardize/SOURCE.md b/contract/api-standardize/SOURCE.md index 686dbcd5..8691eda5 100644 --- a/contract/api-standardize/SOURCE.md +++ b/contract/api-standardize/SOURCE.md @@ -1,6 +1,6 @@ -Pin: 21d3de7 +Pin: 3640713 -openapi.yaml is the generated bundle (`npm run bundle`) of daeuniverse/api-standardize, branch feat/config-source-create, commit 21d3de7 (PR #30, not yet merged). +openapi.yaml is the generated bundle (`npm run bundle`) of daeuniverse/api-standardize, branch feat/config-source-create, commit 3640713 (PR #30, not yet merged). The merged changes include PR #4 client fixes, #5 config, #6 observability and management, #7 connection close, and #8 GroupOverrideCleared with the native outbound mode dropped. They also include #9 rule source IDs, #12 recorder modes and unredacted administrative data, #13 password authentication (8 to 128 characters), #14 DNS cache usage by entry count, #15 configurable geodata sources with automatic updates and update status, #16 flow demand, #17 short DNS pages, and #18 geodata seeding from the configuration file. diff --git a/contract/api-standardize/openapi.yaml b/contract/api-standardize/openapi.yaml index f0388efa..345feb80 100644 --- a/contract/api-standardize/openapi.yaml +++ b/contract/api-standardize/openapi.yaml @@ -1162,7 +1162,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/schema' + $ref: '#/components/schemas/ConfigDiagnosticsErrorResponse' examples: not_included: value: @@ -1490,33 +1490,7 @@ paths: content: application/json: schema: - allOf: - - $ref: '#/components/schemas/ErrorResponse' - - type: object - properties: - error: - type: object - required: - - details - properties: - code: - const: unsupported_value - details: - type: object - required: - - diagnostics - properties: - diagnostics: - type: array - items: - $ref: '#/components/schemas/ConfigDiagnostic' - contains: - type: object - required: - - level - properties: - level: - const: error + $ref: '#/components/schemas/ConfigDiagnosticsErrorResponse' examples: invalid: value: @@ -7701,6 +7675,35 @@ components: end_column: $ref: '#/components/schemas/SafeUInt' minimum: 1 + ConfigDiagnosticsErrorResponse: + description: unsupported_value error whose details.diagnostics holds at least one error-level diagnostic. + allOf: + - $ref: '#/components/schemas/ErrorResponse' + - type: object + properties: + error: + type: object + required: + - details + properties: + code: + const: unsupported_value + details: + type: object + required: + - diagnostics + properties: + diagnostics: + type: array + items: + $ref: '#/components/schemas/ConfigDiagnostic' + contains: + type: object + required: + - level + properties: + level: + const: error ConfigValidationMode: type: string enum: @@ -12532,34 +12535,6 @@ components: oneOf: - type: 'null' - $ref: '#/components/schemas/SafeError' - schema: - allOf: - - $ref: '#/components/schemas/ErrorResponse' - - type: object - properties: - error: - type: object - required: - - details - properties: - code: - const: unsupported_value - details: - type: object - required: - - diagnostics - properties: - diagnostics: - type: array - items: - $ref: '#/components/schemas/ConfigDiagnostic' - contains: - type: object - required: - - level - properties: - level: - const: error examples: FlowUpdated: summary: Flow revision notification diff --git a/src/api/types.ts b/src/api/types.ts index 5e5200ad..88498553 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1624,6 +1624,16 @@ export interface components { end_line: components["schemas"]["SafeUInt"]; end_column: components["schemas"]["SafeUInt"]; }; + /** @description unsupported_value error whose details.diagnostics holds at least one error-level diagnostic. */ + ConfigDiagnosticsErrorResponse: components["schemas"]["ErrorResponse"] & { + error?: { + /** @constant */ + code?: "unsupported_value"; + details: { + diagnostics: components["schemas"]["ConfigDiagnostic"][]; + }; + }; + }; /** @enum {string} */ ConfigValidationMode: "syntax" | "full"; ConfigValidationSource: { @@ -3263,15 +3273,6 @@ export interface components { } | null; error: null | components["schemas"]["SafeError"]; }; - schema: components["schemas"]["ErrorResponse"] & { - error?: { - /** @constant */ - code?: "unsupported_value"; - details: { - diagnostics: components["schemas"]["ConfigDiagnostic"][]; - }; - }; - }; }; responses: { /** @description Unknown source ID or unavailable configuration readback */ @@ -3946,7 +3947,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["schema"]; + "application/json": components["schemas"]["ConfigDiagnosticsErrorResponse"]; }; }; 429: components["responses"]["RateLimited"]; @@ -4081,15 +4082,7 @@ export interface operations { [name: string]: unknown; }; content: { - "application/json": components["schemas"]["ErrorResponse"] & { - error?: { - /** @constant */ - code?: "unsupported_value"; - details: { - diagnostics: components["schemas"]["ConfigDiagnostic"][]; - }; - }; - }; + "application/json": components["schemas"]["ConfigDiagnosticsErrorResponse"]; }; }; /** @description If-Match is required; nothing is written */