Skip to content

Commit

Permalink
Merge pull request #34 from regulaforensics/BE-487-x-request_header
Browse files Browse the repository at this point in the history
[BE-487] X-RequestID header
  • Loading branch information
dangost authored Oct 6, 2022
2 parents bd3e492 + add7c28 commit 2eb650d
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
6 changes: 5 additions & 1 deletion common.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
openapi: 3.0.3

components:

parameters:
page:
name: page
Expand All @@ -19,6 +18,11 @@ components:
schema:
type: integer
default: 1000
x-request:
in: header
name: X-RequestID
schema:
type: string

responses:
BadLicense:
Expand Down
5 changes: 4 additions & 1 deletion detect.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
openapi: 3.0.3
paths:


paths:
/detect:
parameters:
- $ref: './common.yml#/components/parameters/x-request'
post:
tags:
- matching
Expand Down
4 changes: 4 additions & 0 deletions groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ openapi: 3.0.3

paths:
/groups:
parameters:
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- group
Expand Down Expand Up @@ -40,6 +42,7 @@ paths:
/groups/{group_id}:
parameters:
- $ref: '#/components/parameters/group_id'
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- group
Expand Down Expand Up @@ -84,6 +87,7 @@ paths:
/groups/{group_id}/persons:
parameters:
- $ref: "#/components/parameters/group_id"
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- group
Expand Down
2 changes: 2 additions & 0 deletions matching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ openapi: 3.0.3
paths:

/match:
parameters:
- $ref: './common.yml#/components/parameters/x-request'
post:
tags:
- matching
Expand Down
9 changes: 9 additions & 0 deletions persons.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
openapi: 3.0.3


paths:
/persons:
parameters:
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- person
summary: Get persons
operationId: get_all_persons
parameters:
- $ref: './common.yml#/components/parameters/x-request'
- $ref: './common.yml#/components/parameters/page'
- $ref: './common.yml#/components/parameters/size'
responses:
Expand Down Expand Up @@ -37,6 +42,7 @@ paths:
/persons/{person_id}:
parameters:
- $ref: '#/components/parameters/person_id'
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- person
Expand Down Expand Up @@ -83,6 +89,7 @@ paths:
/persons/{person_id}/images:
parameters:
- $ref: '#/components/parameters/person_id'
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- person
Expand Down Expand Up @@ -128,6 +135,7 @@ paths:
/persons/{person_id}/images/{image_id}:
parameters:
- $ref: '#/components/parameters/person_id'
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- person
Expand Down Expand Up @@ -170,6 +178,7 @@ paths:
/persons/{person_id}/groups:
parameters:
- $ref: '#/components/parameters/person_id'
- $ref: './common.yml#/components/parameters/x-request'
get:
tags:
- person
Expand Down
2 changes: 2 additions & 0 deletions search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ openapi: 3.0.3

paths:
/search:
parameters:
- $ref: './common.yml#/components/parameters/x-request'
post:
tags:
- search
Expand Down

0 comments on commit 2eb650d

Please sign in to comment.