-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specification-storage): implement endpoint to fetch specifications
Closes: MRSPECS-3
- Loading branch information
Showing
55 changed files
with
1,451 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
value: | ||
errors: | ||
- message: "Illegal argument error" | ||
type: "IllegalArgumentException" | ||
code: "unknown_error" | ||
total_records: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
value: | ||
errors: | ||
- message: "must not be null" | ||
type: "MethodArgumentNotValidException" | ||
code: "validation_error" | ||
parameters: | ||
- key: "parameter" | ||
value: "null" | ||
total_records: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
in: query | ||
name: limit | ||
description: Limit the number of elements returned in the response. | ||
schema: | ||
type: integer | ||
minimum: 0 | ||
maximum: 500 | ||
default: 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
in: query | ||
name: offset | ||
description: Skip over a number of elements by specifying an offset value for the query. | ||
schema: | ||
type: integer | ||
minimum: 0 | ||
maximum: 9999 | ||
default: 0 |
38 changes: 38 additions & 0 deletions
38
api/paths/specification-storage/get-specifications-path.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
get: | ||
summary: Get Specifications | ||
description: Get a collection of specifications. | ||
operationId: getSpecifications | ||
tags: | ||
- specification-storage | ||
parameters: | ||
- in: query | ||
name: family | ||
description: Filter by specification's family. | ||
schema: | ||
$ref: '../../schemas/family.yaml' | ||
- in: query | ||
name: profile | ||
description: Filter by specification's family profile. | ||
schema: | ||
$ref: '../../schemas/familyProfile.yaml' | ||
- in: query | ||
name: include | ||
description: Limit the number of elements returned in the response. | ||
schema: | ||
type: string | ||
enum: | ||
- all | ||
- required-fields | ||
- $ref: '../../parameters/limit-param.yaml' | ||
- $ref: '../../parameters/offset-param.yaml' | ||
responses: | ||
'200': | ||
description: Collection of specifications | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/specificationCollection.yaml' | ||
'400': | ||
$ref: '../../responses/badRequestResponse.yaml' | ||
'500': | ||
$ref: '../../responses/internalServerErrorResponse.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: Validation errors | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/common/errorCollection.yaml" | ||
examples: | ||
validationErrorResponse: | ||
$ref: "../examples/response/validationErrorResponse.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
description: When unhandled exception occurred during code execution, e.g. NullPointerException. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "../schemas/common/errorCollection.yaml" | ||
examples: | ||
unknownError: | ||
$ref: "../examples/response/unknownErrorResponse.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
description: An error | ||
type: object | ||
properties: | ||
message: | ||
type: string | ||
description: Error message text | ||
type: | ||
type: string | ||
description: Error message type | ||
code: | ||
type: string | ||
description: Error message code | ||
parameters: | ||
type: array | ||
items: | ||
$ref: 'parameter.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
description: A List of errors | ||
type: object | ||
properties: | ||
errors: | ||
description: List of errors | ||
type: array | ||
items: | ||
$ref: 'error.yaml' | ||
totalRecords: | ||
description: Total number of errors | ||
type: integer | ||
example: | ||
errors: | ||
- message: Illegal argument error | ||
type: IllegalArgumentException | ||
code: unknown_error | ||
total_records: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
description: Creater, updater, creation date, last updated date | ||
type: object | ||
properties: | ||
createdDate: | ||
description: Date and time when the record was created | ||
type: string | ||
createdByUserId: | ||
description: ID of the user who created the record (when available) | ||
type: string | ||
format: uuid | ||
updatedDate: | ||
description: Date and time when the record was last updated | ||
type: string | ||
updatedByUserId: | ||
description: ID of the user who last updated the record (when available) | ||
type: string | ||
format: uuid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
description: List of key/value parameters of an error | ||
type: object | ||
properties: | ||
key: | ||
description: Parameter key | ||
type: string | ||
value: | ||
description: Parameter value | ||
type: string | ||
example: | ||
key: source | ||
value: invalid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: string | ||
enum: | ||
- MARC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
type: string | ||
enum: | ||
- authority | ||
- bibliographic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
type: object | ||
x-parent: "abstract" | ||
properties: | ||
id: | ||
type: string | ||
format: uuid | ||
title: | ||
type: string | ||
family: | ||
$ref: 'family.yaml' | ||
profile: | ||
$ref: 'familyProfile.yaml' | ||
url: | ||
type: string | ||
format: url | ||
metadata: | ||
$ref: 'common/metadata.yaml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type: object | ||
properties: | ||
specifications: | ||
type: array | ||
items: | ||
oneOf: | ||
- $ref: 'specification.yaml' | ||
- $ref: 'specificationFull.yaml' | ||
totalRecords: | ||
type: integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
allOf: | ||
- $ref: 'specification.yaml' | ||
- type: object | ||
properties: | ||
fields: | ||
type: array | ||
items: | ||
type: object | ||
rules: | ||
type: array | ||
items: | ||
type: object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.