Skip to content
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

feat(apispec): get project settings #57

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
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
211 changes: 184 additions & 27 deletions apispec/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions apispec/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,33 @@ servers:
- url: https://core.listen.dev

paths:
/api/v1/settings:
get:
summary: Get the settings for the current project
description: This endpoint allows for the retrieval of the settings for the current project.
security:
- JWT:
- "project_id"
- "read:settings"
responses:
"200":
description: Settings retrieved successfully
content:
application/json:
schema:
$ref: "#/components/schemas/Settings"
"401":
description: "Unauthorized"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
"500":
description: "Internal server error"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/api/v1/informational/event:
post:
summary: Create a new informational event
Expand Down Expand Up @@ -144,6 +171,38 @@ components:
type: string
message:
type: string
Settings:
type: object
properties:
project_id:
type: string
description: The id of the project that the settings belongs to
x-oapi-codegen-extra-tags:
bson: "project_id"
policies:
type: object
description: The policies associated with the settings
additionalProperties:
type: object
properties:
observe:
type: boolean
x-oapi-codegen-extra-tags:
bson: "policies"
tokens:
type: object
description: The tokens associated with the settings
additionalProperties:
type: object
properties:
key:
type: string
x-oapi-codegen-extra-tags:
bson: "tokens"
required:
- id
- project_id
- policies
# see: https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
GitHubEventContext:
type: object
Expand Down
Loading