Skip to content

Commit

Permalink
#232 - Add Schema Classification
Browse files Browse the repository at this point in the history
  • Loading branch information
mfriesen committed Jul 7, 2024
1 parent 2e14cda commit 978e286
Show file tree
Hide file tree
Showing 44 changed files with 3,854 additions and 566 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ public Map<String, AttributeValue> get(final QueryConfig config, final Attribute

@Override
public List<Map<String, AttributeValue>> getBatch(final BatchGetConfig config,
final List<Map<String, AttributeValue>> keys) {
final List<Map<String, AttributeValue>> attributes) {

List<Map<String, AttributeValue>> keys =
attributes.stream().map(a -> Map.of(PK, a.get(PK), SK, a.get(SK))).toList();

List<Map<String, AttributeValue>> list = Collections.emptyList();

Expand Down
255 changes: 255 additions & 0 deletions docs/openapi/openapi-iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,173 @@
- ApiAuthorization: []
x-amazon-apigateway-integration:
$ref: '#/components/x-amazon-apigateway-integrations/lambdaApi200'
/sites/{siteId}/classifications:
get:
operationId: GetSitesClassifications
description: Gets Sites Classifications
summary: Get Sites Classifications
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/siteIdPathParam'
- $ref: '#/components/parameters/limitParam'
- $ref: '#/components/parameters/nextParam'
responses:
"200":
description: 200 OK
headers:
Access-Control-Allow-Origin:
schema:
type: string
Access-Control-Allow-Methods:
schema:
type: string
Access-Control-Allow-Headers:
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/GetClassificationsResponse'
security:
- ApiAuthorization: []
x-amazon-apigateway-integration:
$ref: '#/components/x-amazon-apigateway-integrations/lambdaApi200'
post:
operationId: AddClassification
description: Add Classification
summary: Add Classification
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/siteIdPathParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AddClassificationRequest'
responses:
"200":
description: 200 OK
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/AccessControlAllowOrigin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/AccessControlAllowMethods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/AccessControlAllowHeaders'
content:
application/json:
schema:
$ref: '#/components/schemas/AddClassificationResponse'
"400":
description: 400 OK
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorsResponse'
security:
- ApiAuthorization: []
x-amazon-apigateway-integration:
$ref: '#/components/x-amazon-apigateway-integrations/lambdaApi200'
/sites/{siteId}/classifications/{classificationId}:
get:
operationId: GetClassification
description: Get Classification
summary: Get Classification
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/siteIdPathParam'
- $ref: '#/components/parameters/classificationIdParam'
responses:
"200":
description: 200 OK
headers:
Access-Control-Allow-Origin:
schema:
type: string
Access-Control-Allow-Methods:
schema:
type: string
Access-Control-Allow-Headers:
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/GetClassificationResponse'
security:
- ApiAuthorization: []
x-amazon-apigateway-integration:
$ref: '#/components/x-amazon-apigateway-integrations/lambdaApi200'
delete:
operationId: DeleteClassification
description: Delete Classification
summary: Delete Classification
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/siteIdPathParam'
- $ref: '#/components/parameters/classificationIdParam'
responses:
"200":
description: 200 OK
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/AccessControlAllowOrigin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/AccessControlAllowMethods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/AccessControlAllowHeaders'
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
security:
- ApiAuthorization: []
x-amazon-apigateway-integration:
$ref: '#/components/x-amazon-apigateway-integrations/lambdaApi200'
put:
operationId: SetClassification
description: Sets Classification
summary: Set Classification
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/siteIdPathParam'
- $ref: '#/components/parameters/classificationIdParam'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SetClassificationRequest'
responses:
"200":
description: 200 OK
headers:
Access-Control-Allow-Origin:
$ref: '#/components/headers/AccessControlAllowOrigin'
Access-Control-Allow-Methods:
$ref: '#/components/headers/AccessControlAllowMethods'
Access-Control-Allow-Headers:
$ref: '#/components/headers/AccessControlAllowHeaders'
content:
application/json:
schema:
$ref: '#/components/schemas/SetResponse'
"400":
description: 400 OK
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorsResponse'
security:
- ApiAuthorization: []
x-amazon-apigateway-integration:
$ref: '#/components/x-amazon-apigateway-integrations/lambdaApi200'
/sites/{siteId}/configuration:
get:
operationId: GetConfiguration
Expand Down Expand Up @@ -5714,6 +5881,13 @@
required: true
schema:
type: string
classificationIdParam:
name: classificationId
in: path
description: Classification Identifier
required: true
schema:
type: string
documentIdParam:
name: documentId
in: path
Expand Down Expand Up @@ -6894,6 +7068,19 @@
type: boolean
description: Attribute with boolean value
AddDocumentAttribute:
oneOf:
- $ref: '#/components/schemas/AddDocumentAttributeStandard'
- $ref: '#/components/schemas/AddDocumentAttributeClassification'
AddDocumentAttributeClassification:
required:
- classificationKey
type: object
description: Document Classification
properties:
classificationId:
type: string
description: Classification Identifier
AddDocumentAttributeStandard:
required:
- key
type: object
Expand Down Expand Up @@ -7040,6 +7227,8 @@
userId:
type: string
description: User who added attribute
valueType:
$ref: '#/components/schemas/AttributeValueType'
DocumentTag:
type: object
properties:
Expand Down Expand Up @@ -7186,6 +7375,8 @@
- NUMBER
- STRING
- PUBLICATION
- CLASSIFICATION
- COMPOSITE_STRING
FulltextAttribute:
type: object
properties:
Expand Down Expand Up @@ -9322,6 +9513,12 @@
uploadEmail:
type: string
description: SiteId document upload email address
AddClassificationResponse:
type: object
properties:
classificationId:
type: string
description: Classification Identifier
AddTagSchemaResponse:
type: object
properties:
Expand Down Expand Up @@ -9578,6 +9775,64 @@
version:
description: Version of schema
type: integer
GetClassificationResponse:
type: object
properties:
classification:
$ref: '#/components/schemas/Classification'
GetClassificationsResponse:
type: object
properties:
next:
type: string
description: Next page of results token
classifications:
type: array
description: List of classifications
items:
$ref: '#/components/schemas/ClassificationSummary'
ClassificationSummary:
type: object
properties:
name:
description: Name of Classification
type: string
userId:
type: string
insertedDate:
type: string
description: Inserted Timestamp
Classification:
type: object
properties:
name:
description: Name of Classification
type: string
userId:
type: string
insertedDate:
type: string
description: Inserted Timestamp
attributes:
$ref: '#/components/schemas/SchemaAttributes'
AddClassification:
type: object
properties:
name:
description: Name of Classification
type: string
attributes:
$ref: '#/components/schemas/SchemaAttributes'
SetClassificationRequest:
type: object
properties:
classification:
$ref: '#/components/schemas/AddClassification'
AddClassificationRequest:
type: object
properties:
classification:
$ref: '#/components/schemas/AddClassification'
SetSitesSchemaRequest:
type: object
properties:
Expand Down
Loading

0 comments on commit 978e286

Please sign in to comment.