Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mfriesen committed Jun 4, 2024
1 parent 5ec432a commit bdb515c
Show file tree
Hide file tree
Showing 11 changed files with 481 additions and 144 deletions.
90 changes: 74 additions & 16 deletions docs/openapi/openapi-iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7045,6 +7045,26 @@
type: object
additionalProperties:
type: object
attributes:
type: object
additionalProperties:
$ref: '#/components/schemas/FulltextAttribute'
FulltextAttribute:
type: object
properties:
stringValues:
type: array
description: Attribute with string values
items:
type: string
numberValues:
type: array
description: Attribute with number values
items:
type: number
booleanValue:
type: boolean
description: Attribute with boolean value
GetDocumentFulltextResponse:
type: object
properties:
Expand Down Expand Up @@ -7089,21 +7109,7 @@
attributes:
type: object
additionalProperties:
type: object
properties:
stringValues:
type: array
description: Attribute with string values
items:
type: string
numberValues:
type: array
description: Attribute with number values
items:
type: number
booleanValue:
type: boolean
description: Attribute with boolean value
$ref: '#/components/schemas/FulltextAttribute'
GetDocumentSyncResponse:
type: object
properties:
Expand Down Expand Up @@ -8846,14 +8852,66 @@
description: Attribute Key
eq:
$ref: '#/components/schemas/OpaPolicyAttributeEq'
gt:
$ref: '#/components/schemas/OpaPolicyAttributeGt'
gte:
$ref: '#/components/schemas/OpaPolicyAttributeGte'
lt:
$ref: '#/components/schemas/OpaPolicyAttributeLt'
lte:
$ref: '#/components/schemas/OpaPolicyAttributeLte'
neq:
$ref: '#/components/schemas/OpaPolicyAttributeNeq'
OpaPolicyAttributeEq:
type: object
description: Attribute EQ criteria
properties:
text:
stringValue:
type: string
description: The value to compare the Attribute Key value to
numberValue:
type: number
description: The value to compare the Attribute Key value to
booleanValue:
type: boolean
description: The value to compare the Attribute Key value to
input:
$ref: '#/components/schemas/OpaPolicyAttributeInput'
OpaPolicyAttributeGt:
type: object
description: Attribute greater than criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeGte:
type: object
description: Attribute greater than and equals to criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeLt:
type: object
description: Attribute less than criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeLte:
type: object
description: Attribute less than and equals to criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeNeq:
type: object
description: Attribute not equal to criteria
properties:
stringValue:
type: string
description: The value to compare the Attribute Key value to
OpaPolicyAttributeInput:
type: object
properties:
Expand Down
90 changes: 74 additions & 16 deletions docs/openapi/openapi-jwt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7045,6 +7045,26 @@
type: object
additionalProperties:
type: object
attributes:
type: object
additionalProperties:
$ref: '#/components/schemas/FulltextAttribute'
FulltextAttribute:
type: object
properties:
stringValues:
type: array
description: Attribute with string values
items:
type: string
numberValues:
type: array
description: Attribute with number values
items:
type: number
booleanValue:
type: boolean
description: Attribute with boolean value
GetDocumentFulltextResponse:
type: object
properties:
Expand Down Expand Up @@ -7089,21 +7109,7 @@
attributes:
type: object
additionalProperties:
type: object
properties:
stringValues:
type: array
description: Attribute with string values
items:
type: string
numberValues:
type: array
description: Attribute with number values
items:
type: number
booleanValue:
type: boolean
description: Attribute with boolean value
$ref: '#/components/schemas/FulltextAttribute'
GetDocumentSyncResponse:
type: object
properties:
Expand Down Expand Up @@ -8846,14 +8852,66 @@
description: Attribute Key
eq:
$ref: '#/components/schemas/OpaPolicyAttributeEq'
gt:
$ref: '#/components/schemas/OpaPolicyAttributeGt'
gte:
$ref: '#/components/schemas/OpaPolicyAttributeGte'
lt:
$ref: '#/components/schemas/OpaPolicyAttributeLt'
lte:
$ref: '#/components/schemas/OpaPolicyAttributeLte'
neq:
$ref: '#/components/schemas/OpaPolicyAttributeNeq'
OpaPolicyAttributeEq:
type: object
description: Attribute EQ criteria
properties:
text:
stringValue:
type: string
description: The value to compare the Attribute Key value to
numberValue:
type: number
description: The value to compare the Attribute Key value to
booleanValue:
type: boolean
description: The value to compare the Attribute Key value to
input:
$ref: '#/components/schemas/OpaPolicyAttributeInput'
OpaPolicyAttributeGt:
type: object
description: Attribute greater than criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeGte:
type: object
description: Attribute greater than and equals to criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeLt:
type: object
description: Attribute less than criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeLte:
type: object
description: Attribute less than and equals to criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeNeq:
type: object
description: Attribute not equal to criteria
properties:
stringValue:
type: string
description: The value to compare the Attribute Key value to
OpaPolicyAttributeInput:
type: object
properties:
Expand Down
90 changes: 74 additions & 16 deletions docs/openapi/openapi-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7045,6 +7045,26 @@
type: object
additionalProperties:
type: object
attributes:
type: object
additionalProperties:
$ref: '#/components/schemas/FulltextAttribute'
FulltextAttribute:
type: object
properties:
stringValues:
type: array
description: Attribute with string values
items:
type: string
numberValues:
type: array
description: Attribute with number values
items:
type: number
booleanValue:
type: boolean
description: Attribute with boolean value
GetDocumentFulltextResponse:
type: object
properties:
Expand Down Expand Up @@ -7089,21 +7109,7 @@
attributes:
type: object
additionalProperties:
type: object
properties:
stringValues:
type: array
description: Attribute with string values
items:
type: string
numberValues:
type: array
description: Attribute with number values
items:
type: number
booleanValue:
type: boolean
description: Attribute with boolean value
$ref: '#/components/schemas/FulltextAttribute'
GetDocumentSyncResponse:
type: object
properties:
Expand Down Expand Up @@ -8846,14 +8852,66 @@
description: Attribute Key
eq:
$ref: '#/components/schemas/OpaPolicyAttributeEq'
gt:
$ref: '#/components/schemas/OpaPolicyAttributeGt'
gte:
$ref: '#/components/schemas/OpaPolicyAttributeGte'
lt:
$ref: '#/components/schemas/OpaPolicyAttributeLt'
lte:
$ref: '#/components/schemas/OpaPolicyAttributeLte'
neq:
$ref: '#/components/schemas/OpaPolicyAttributeNeq'
OpaPolicyAttributeEq:
type: object
description: Attribute EQ criteria
properties:
text:
stringValue:
type: string
description: The value to compare the Attribute Key value to
numberValue:
type: number
description: The value to compare the Attribute Key value to
booleanValue:
type: boolean
description: The value to compare the Attribute Key value to
input:
$ref: '#/components/schemas/OpaPolicyAttributeInput'
OpaPolicyAttributeGt:
type: object
description: Attribute greater than criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeGte:
type: object
description: Attribute greater than and equals to criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeLt:
type: object
description: Attribute less than criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeLte:
type: object
description: Attribute less than and equals to criteria
properties:
numberValue:
type: number
description: The value to compare the Attribute Key value to
OpaPolicyAttributeNeq:
type: object
description: Attribute not equal to criteria
properties:
stringValue:
type: string
description: The value to compare the Attribute Key value to
OpaPolicyAttributeInput:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,29 +287,13 @@ public String sk() {
@Override
public String skGsi1() {

String val;

switch (this.valueType) {
case STRING:
case COMPOSITE_STRING:
val = this.stringValue;
break;

case NUMBER:
val = formatDouble(this.numberValue);
break;

case BOOLEAN:
val = this.booleanValue.toString();
break;

case KEY_ONLY:
val = "#";
break;

default:
throw new IllegalArgumentException("Unexpected value: " + this.valueType);
}
String val = switch (this.valueType) {
case STRING, COMPOSITE_STRING -> this.stringValue;
case NUMBER -> formatDouble(this.numberValue);
case BOOLEAN -> this.booleanValue.toString();
case KEY_ONLY -> "#";
default -> throw new IllegalArgumentException("Unexpected value: " + this.valueType);
};

return val;
}
Expand Down
Loading

0 comments on commit bdb515c

Please sign in to comment.