Skip to content

feat(spec/search): add vault endpoints to spec (APIC-196) #35

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 16 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from 9 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
23 changes: 23 additions & 0 deletions specs/search/paths/vault/appendSource.yml
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
post:
tags:
- vault
operationId: appendSource
description: Add a single source to the list of allowed sources.
requestBody:
required: true
description: The sources to allow
content:
application/json:
schema:
$ref: './common/schemas.yml#/sourceObject'
responses:
'200':
description: OK
content:
application/json:
schema:
title: appendSourceResponse
type: object
additionalProperties: false
properties:
createdAt:
$ref: '../../../common/parameters.yml#/updatedAt'
2 changes: 2 additions & 0 deletions specs/search/paths/vault/common/schemas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
updatedAt:
$ref: '../../../common/parameters.yml#/updatedAt'
24 changes: 24 additions & 0 deletions specs/search/paths/vault/deleteSource.yml
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
delete:
tags:
- vault
operationId: deleteSource
description: Remove a single source from the list of allowed sources.
parameters:
- name: source
in: path
required: true
description: The IP range of the source
schema:
type: string
example: "10.0.0.1/32"
responses:
'200':
description: OK
content:
application/json:
schema:
title: deleteSourceResponse
type: object
additionalProperties: false
properties:
deletedAt:
$ref: '../../../common/parameters.yml#/updatedAt'
41 changes: 41 additions & 0 deletions specs/search/paths/vault/vaultSources.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
get:
tags:
- vault
operationId: getSources
description: List all allowed sources.
responses:
'200':
description: OK
content:
application/json:
schema:
title: listSourceResponse
type: array
items:
$ref: './common/schemas.yml#/sourceObject'

put:
tags:
- vault
operationId: replaceSources
description: Replace all allowed sources.
requestBody:
required: true
description: The sources to allow
content:
application/json:
schema:
title: sourceObjectList
type: array
items:
$ref: './common/schemas.yml#/sourceObject'
responses:
'200':
description: OK
content:
application/json:
schema:
title: replaceSourceResponse
type: object
additionalProperties: false
properties:
updatedAt:
$ref: '../../../common/parameters.yml#/updatedAt'
12 changes: 6 additions & 6 deletions specs/search/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ paths:
# #######################
# ### Vault Endpoints ###
# #######################
# /1/security/sources:
# $ref: './paths/vault/vaultSources.yml'
# /1/security/sources/append:
# $ref: './paths/vault/appendSource.yml'
# /1/security/sources/{source}:
# $ref: './paths/vault/deleteSource.yml'
/1/security/sources:
$ref: './paths/vault/vaultSources.yml'
/1/security/sources/append:
$ref: './paths/vault/appendSource.yml'
/1/security/sources/{source}:
$ref: './paths/vault/deleteSource.yml'

# ##########################
# ### Advanced Endpoints ###
Expand Down