Skip to content

Commit

Permalink
Improve OpenApi spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
dzarras committed Jul 26, 2024
1 parent 8c070a2 commit 8de7776
Showing 1 changed file with 78 additions and 17 deletions.
95 changes: 78 additions & 17 deletions src/main/resources/public/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PresentationEventsResponse"
"$ref": "#/components/schemas/PresentationEvents"
}
}
}
Expand Down Expand Up @@ -812,46 +812,107 @@
}
]
},
"PresentationEventsResponse": {
"Instant": {
"type": "number",
"nullable": false,
"format": "int64"
},
"EventName": {
"type": "string",
"nullable": false
},
"Actor": {
"type": "string",
"nullable": false,
"enum": [
"Verifier",
"Wallet",
"VerifierEndPoint"
]
},
"PresentationEvent": {
"type": "object",
"nullable": false,
"properties": {
"transaction_id": {
"timestamp": {
"allOf": [
{
"description": "The unique identifier of the newly initialized Transaction."
"description": "The timestamp of the event"
},
{
"type": "string",
"nullable": false
"$ref": "#/components/schemas/Instant"
}
]
},
"last_updated": {
"event": {
"allOf": [
{
"description": "The timestamp of the last event"
"description": "The name of the event"
},
{
"type": "number",
"nullable": false
"$ref": "#/components/schemas/EventName"
}
]
},
"events": {
"actor": {
"allOf": [
{
"description": "The events related to the presentation"
"description": "The actor of the event"
},
{
"type": "array",
"items": {
"type": "object"
}
"$ref": "#/components/schemas/Actor"
}
]
}
}
},
"required": [
"timestamp",
"event",
"actor"
],
"additionalProperties": true
},
"PresentationEvents": {
"type": "object",
"nullable": false,
"properties": {
"transaction_id": {
"allOf": [
{
"description": "The unique identifier of the Transaction."
},
{
"$ref": "#/components/schemas/TransactionId"
}
]
},
"last_updated": {
"allOf": [
{
"description": "The timestamp of the last event"
},
{
"$ref": "#/components/schemas/Instant"
}
]
},
"events": {
"description": "The events related to the presentation",
"type": "array",
"nullable": false,
"items": {
"$ref": "#/components/schemas/PresentationEvent"
},
"minItems": 1,
"uniqueItems": true
}
},
"required": [
"transaction_id",
"last_updated",
"events"
],
"additionalProperties": false
}
},
"examples": {
Expand Down

0 comments on commit 8de7776

Please sign in to comment.