Skip to content

OpenAPI Specs: Update /db/_config/audit endpoint body format #6963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions docs/api/components/schemas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1878,18 +1878,28 @@ Database-audit:
title: Database-audit
description: A map of audit events and whether they are enabled or not.
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
type: boolean
properties:
enabled:
type: boolean
events:
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
type: boolean
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this worth adding an example for the format? I am somewhat confused by why this is map[string]any and then it is actually map[string]bool?

Copy link
Member Author

@bbrks bbrks Jul 16, 2024

Choose a reason for hiding this comment

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

The PUT/POST endpoint accepts both verbose and non-verbose formats (without specifying the ?verbose=true query param)

This is displayed correctly for both cases in the Redocly UI with a dropdown to select the type of body format.

Screenshot 2024-07-16 at 19 21 29
Screenshot 2024-07-16 at 19 21 32

Database-audit-verbose:
title: Database-audit-verbose
description: A map of detailed audit events.
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
$ref: '#/AuditEventVerbose'
properties:
enabled:
type: boolean
events:
type: object
additionalProperties:
x-additionalPropertiesName: audit_id
description: The audit event ID and whether it is enabled or not.
$ref: '#/AuditEventVerbose'
AuditEventVerbose:
title: audit-event-verbose
description: Detailed information about an audit event.
Expand Down
Loading