Skip to content

Instantly share code, notes, and snippets.

@rikukissa
Last active April 4, 2025 06:32
Show Gist options
  • Save rikukissa/9d0d4c14c74ce36ff11c27f9869fd643 to your computer and use it in GitHub Desktop.
Save rikukissa/9d0d4c14c74ce36ff11c27f9869fd643 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: User API
version: 1.0.0
description: A simple user API
servers:
- url: https://api.example.com
paths:
/events:
get:
operationId: eventConfigGet
summary: Get event configurations
description: Get event configurations
tags:
- events
security: []
parameters: []
responses:
"200":
description: Success
content:
application/json:
schema:
type: object
properties:
id:
type: string
description: A machine-readable identifier for the event, e.g. "birth" or
"death"
summary:
type: object
properties:
title:
type: object
properties:
id:
type: string
label:
type: object
properties:
id:
&a1
type: string
description: The identifier of the translation referred in translation CSV files
defaultMessage:
&a2
type: string
description: Default translation message
description:
&a3
type: string
description: Describe the translation for a translator to be able to identify
it.
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Title content
emptyValueMessage:
&a4
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
required:
- id
- label
additionalProperties: false
description: Title of summary view.
fields:
type: array
items:
type: object
properties:
id:
type: string
description: Id of summary field
value:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Summary field value. Can utilise values defined in configuration
and EventMetadata
label: *a4
emptyValueMessage: *a4
required:
- id
- value
- label
additionalProperties: false
description: Fields rendered in summary view.
required:
- title
- fields
additionalProperties: false
description: Configuration for summary in event.
label: *a4
actions:
type: array
items:
anyOf:
- type: object
properties:
label: *a4
conditionals:
&a29
type: array
items:
anyOf:
- &a9
type: object
properties:
type:
type: string
enum:
- SHOW
conditional: {}
required:
- type
- conditional
additionalProperties: false
- &a10
type: object
properties:
type:
type: string
enum:
- ENABLE
conditional: {}
required:
- type
- conditional
additionalProperties: false
default: []
draft:
&a30
type: boolean
type:
type: string
enum:
- DECLARE
review:
&a31
type: object
properties:
title:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Title of the review page
fields:
type: array
items:
&a32
anyOf:
- type: object
properties:
id:
&a11
type: string
defaultValue:
anyOf:
- anyOf:
- type: object
properties:
country:
&a5
type: string
addressType:
&a6
type: string
enum:
- DOMESTIC
province:
&a7
type: string
district:
&a8
type: string
urbanOrRural:
type: string
enum:
- URBAN
town:
type: string
residentialArea:
type: string
street:
type: string
number:
type: string
zipCode:
type: string
required:
- country
- addressType
- province
- district
- urbanOrRural
additionalProperties: false
- type: object
properties:
country: *a5
addressType: *a6
province: *a7
district: *a8
urbanOrRural:
type: string
enum:
- RURAL
village:
type: string
required:
- country
- addressType
- province
- district
- urbanOrRural
additionalProperties: false
- type: object
properties:
country:
type: string
addressType:
type: string
enum:
- INTERNATIONAL
state:
type: string
district2:
type: string
cityOrTown:
type: string
addressLine1:
type: string
addressLine2:
type: string
addressLine3:
type: string
postcodeOrZip:
type: string
required:
- country
- addressType
- state
- district2
additionalProperties: false
conditionals:
&a12
type: array
items:
anyOf:
- *a9
- *a10
default: []
required:
&a13
type: boolean
default: false
disabled:
&a14
type: boolean
default: false
hidden:
&a15
type: boolean
default: false
placeholder: *a4
validation:
&a16
type: array
items:
type: object
properties:
validator: {}
message: *a4
required:
- validator
- message
additionalProperties: false
default: []
dependsOn:
&a17
type: array
items: *a11
default: []
label: *a4
hideLabel:
&a18
type: boolean
default: false
type:
type: string
enum:
- ADDRESS
required:
- id
- label
- type
additionalProperties: false
description: Address input field – a combination of location and text fields
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- &a20
type: string
minLength: 1
- &a19
type: object
properties:
dependsOn:
type: array
items: *a11
default: []
expression:
type: string
required:
- expression
additionalProperties: false
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- TEXT
configuration:
type: object
properties:
maxLength:
type: number
description: Maximum length of the text
type:
type: string
enum:
- text
- password
prefix: *a4
postfix: *a4
additionalProperties: false
default:
type: text
required:
- id
- label
- type
additionalProperties: false
description: Text input
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- &a25
type: number
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- NUMBER
configuration:
type: object
properties:
min:
type: number
description: Minimum value
max:
type: number
description: Maximum value
prefix: *a4
postfix: *a4
additionalProperties: false
required:
- id
- label
- type
additionalProperties: false
description: Number input
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- TEXTAREA
configuration:
type: object
properties:
maxLength:
type: number
description: Maximum length of the text
rows:
type: number
description: Number of visible text lines
cols:
type: number
description: Number of visible columns
prefix: *a4
postfix: *a4
additionalProperties: false
default:
rows: 4
required:
- id
- label
- type
additionalProperties: false
description: Multiline text input
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- &a24
type: string
description: Date in the format YYYY-MM-DD
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- DATE
configuration:
type: object
properties:
notice:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Text to display above the date input
additionalProperties: false
required:
- id
- label
- type
additionalProperties: false
description: A single date input (dd-mm-YYYY)
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- PARAGRAPH
configuration:
type: object
properties:
styles:
type: object
properties:
fontVariant:
&a21
type: string
enum:
- reg12
- reg14
- reg16
- reg18
- h4
- h3
- h2
- h1
additionalProperties: false
additionalProperties: false
default: {}
required:
- id
- label
- type
additionalProperties: false
description: A read-only HTML <p> paragraph
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- &a22
type: string
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- RADIO_GROUP
options:
type: array
items:
&a23
type: object
properties:
value:
type: string
description: The value of the option
label:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: The label of the option
required:
- value
- label
additionalProperties: false
description: A list of options
configuration:
type: object
properties:
styles:
type: object
properties:
size:
type: string
enum:
- NORMAL
- LARGE
additionalProperties: false
additionalProperties: false
required:
- id
- label
- type
- options
additionalProperties: false
description: Grouped radio options
- type: object
properties:
id: *a11
defaultValue:
type: string
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- BULLET_LIST
items:
type: array
items: *a4
description: A list of items
configuration:
type: object
properties:
styles:
type: object
properties:
fontVariant: *a21
additionalProperties: false
additionalProperties: false
default: {}
required:
- id
- label
- type
- items
additionalProperties: false
description: A list of bullet points
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- PAGE_HEADER
required:
- id
- label
- type
additionalProperties: false
description: A read-only header component for form pages
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a22
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- SELECT
options:
type: array
items: *a23
description: A list of options
required:
- id
- label
- type
- options
additionalProperties: false
description: Select input
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- &a26
type: boolean
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- CHECKBOX
required:
- id
- label
- type
additionalProperties: false
description: Boolean checkbox field
- type: object
properties:
id: *a11
defaultValue:
&a27
anyOf:
- anyOf:
- *a22
- *a20
- *a24
- *a25
- *a26
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- FILE
configuration:
type: object
properties:
maxFileSize:
type: number
description: Maximum file size in bytes
default: 5242880
acceptedFileTypes:
type: array
items:
&a28
type: string
enum:
- image/png
- image/jpg
- image/jpeg
- image/svg+xml
description: List of allowed file formats for the signature
style:
type: object
properties:
width:
type: string
enum:
- full
- auto
description: Whether the file upload button should take the full width of the
container or not
additionalProperties: false
additionalProperties: false
default:
maxFileSize: 5242880
required:
- id
- label
- type
additionalProperties: false
description: File upload
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- COUNTRY
required:
- id
- label
- type
additionalProperties: false
description: Country select field
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- ADMINISTRATIVE_AREA
configuration:
type: object
properties:
partOf:
type: object
properties:
$declaration:
type: string
required:
- $declaration
additionalProperties: false
description: Parent location
type:
type: string
enum:
- ADMIN_STRUCTURE
- HEALTH_FACILITY
- CRVS_OFFICE
required:
- type
additionalProperties: false
description: Administrative area options
required:
- id
- label
- type
- configuration
additionalProperties: false
description: Administrative area input field e.g. facility, office
- type: object
properties:
id: *a11
defaultValue: *a27
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- DIVIDER
required:
- id
- label
- type
additionalProperties: false
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- LOCATION
required:
- id
- label
- type
additionalProperties: false
description: Input field for a location
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- FACILITY
required:
- id
- label
- type
additionalProperties: false
description: Input field for a facility
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- OFFICE
required:
- id
- label
- type
additionalProperties: false
description: Input field for an office
- type: object
properties:
id: *a11
defaultValue: *a27
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- SIGNATURE
signaturePromptLabel:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Title of the signature modal
configuration:
type: object
properties:
maxFileSize:
type: number
description: Maximum file size in bytes
default: 5242880
acceptedFileTypes:
type: array
items: *a28
description: List of allowed file formats for the signature
additionalProperties: false
default:
maxFileSize: 5242880
required:
- id
- label
- type
- signaturePromptLabel
additionalProperties: false
description: Signature input field
- type: object
properties:
id: *a11
defaultValue:
anyOf:
- *a20
- *a19
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- EMAIL
configuration:
type: object
properties:
maxLength:
type: number
description: Maximum length of the text
additionalProperties: false
default:
maxLength: 10
required:
- id
- label
- type
additionalProperties: false
- type: object
properties:
id: *a11
defaultValue: *a27
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- FILE_WITH_OPTIONS
options:
type: array
items: *a23
description: A list of options
configuration:
type: object
properties:
maxFileSize:
type: number
description: Maximum file size in bytes
default: 5242880
acceptedFileTypes:
type: array
items: *a28
description: List of allowed file formats for the signature
additionalProperties: false
default:
maxFileSize: 5242880
required:
- id
- label
- type
- options
additionalProperties: false
- type: object
properties:
id: *a11
defaultValue: *a27
conditionals: *a12
required: *a13
disabled: *a14
hidden: *a15
placeholder: *a4
validation: *a16
dependsOn: *a17
label: *a4
hideLabel: *a18
type:
type: string
enum:
- DATA
configuration:
type: object
properties:
subtitle: *a4
data:
type: array
items:
anyOf:
- type: object
properties:
label: *a4
value:
type: string
required:
- label
- value
additionalProperties: false
- type: object
properties:
fieldId:
type: string
required:
- fieldId
additionalProperties: false
required:
- data
additionalProperties: false
required:
- id
- label
- type
- configuration
additionalProperties: false
description: Data field for displaying read-only data
description: Fields to be rendered on the review page for annotations.
required:
- title
- fields
additionalProperties: false
description: Configuration for **declaration** review page.
required:
- label
- type
- review
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- VALIDATE
review: *a31
required:
- label
- type
- review
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- REJECT
required:
- label
- type
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- MARKED_AS_DUPLICATE
required:
- label
- type
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- ARCHIVE
required:
- label
- type
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- REGISTER
review: *a31
required:
- label
- type
- review
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- DELETE
required:
- label
- type
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- PRINT_CERTIFICATE
printForm:
type: object
properties:
label:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Human readable description of the form
pages:
type: array
items:
&a37
anyOf:
- &a38
type: object
properties:
id:
&a33
type: string
description: Unique identifier for the page
title:
&a34
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Header title of the page
fields:
&a35
type: array
items: *a32
description: Fields to be rendered on the page
conditional:
&a36
description: Page will be shown if condition is met. If conditional is not
defined, the page will be always
shown.
type:
type: string
enum:
- FORM
default: FORM
required:
- id
- title
- fields
additionalProperties: false
- type: object
properties:
id: *a33
title: *a34
fields: *a35
conditional: *a36
type:
type: string
enum:
- VERIFICATION
actions:
type: object
properties:
verify:
type: object
properties:
label: *a4
required:
- label
additionalProperties: false
cancel:
type: object
properties:
label: *a4
confirmation:
type: object
properties:
title: *a4
body: *a4
required:
- title
- body
additionalProperties: false
required:
- label
- confirmation
additionalProperties: false
required:
- verify
- cancel
additionalProperties: false
description: Actions available on the verification page
required:
- id
- title
- fields
- type
- actions
additionalProperties: false
required:
- label
- pages
additionalProperties: false
required:
- label
- type
- printForm
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- REQUEST_CORRECTION
onboardingForm:
type: array
items: *a37
additionalDetailsForm:
type: array
items: *a37
required:
- label
- type
- onboardingForm
- additionalDetailsForm
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- REJECT_CORRECTION
required:
- label
- type
additionalProperties: false
- type: object
properties:
label: *a4
conditionals: *a29
draft: *a30
type:
type: string
enum:
- APPROVE_CORRECTION
required:
- label
- type
additionalProperties: false
declaration:
type: object
properties:
label:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Human readable description of the form
pages:
type: array
items: *a38
required:
- label
- pages
additionalProperties: false
description: Configuration for a declaration form
workqueues:
type: array
items:
type: object
properties:
id:
type: string
description: Unique identifier for workqueue.
filters:
type: array
items:
type: object
properties:
status:
type: array
items:
type: string
enum:
- CREATED
- NOTIFIED
- DECLARED
- VALIDATED
- REGISTERED
- CERTIFIED
- REJECTED
- ARCHIVED
description: Defines which statusese are included in the workqueue.
required:
- status
additionalProperties: false
description: Filters to be applied to workqueue.
required:
- id
- filters
additionalProperties: false
description: Configuration for workqueue.
deduplication:
type: array
items:
type: object
properties:
id:
type: string
label: *a4
query:
anyOf:
- type: object
properties:
type:
type: string
enum:
- and
clauses:
type: array
items: {}
required:
- type
- clauses
additionalProperties: false
- type: object
properties:
type:
type: string
enum:
- or
clauses:
type: array
items: {}
required:
- type
- clauses
additionalProperties: false
- type: object
properties:
fieldId:
&a39
type: string
options:
type: object
properties:
fuzziness:
anyOf:
- type: string
- type: number
default: AUTO:4,7
boost:
type: number
default: 1
additionalProperties: false
default: {}
type:
type: string
enum:
- fuzzy
required:
- fieldId
- type
additionalProperties: false
- type: object
properties:
fieldId: *a39
options:
type: object
properties:
boost:
type: number
default: 1
additionalProperties: false
default: {}
type:
type: string
enum:
- strict
required:
- fieldId
- type
additionalProperties: false
- type: object
properties:
fieldId: *a39
options:
type: object
properties:
days:
type: number
origin:
&a40
type: string
boost:
type: number
default: 1
required:
- days
- origin
additionalProperties: false
type:
type: string
enum:
- dateRange
required:
- fieldId
- options
- type
additionalProperties: false
- type: object
properties:
fieldId: *a39
options:
type: object
properties:
days:
type: number
origin: *a40
boost:
type: number
default: 1
required:
- days
- origin
additionalProperties: false
type:
type: string
enum:
- dateDistance
required:
- fieldId
- options
- type
additionalProperties: false
required:
- id
- label
- query
additionalProperties: false
default: []
advancedSearch:
type: array
items:
type: object
properties:
title:
type: object
properties:
id: *a1
defaultMessage: *a2
description: *a3
required:
- id
- defaultMessage
- description
additionalProperties: false
description: Advanced search tab title
fields:
type: array
items:
type: object
properties:
fieldId:
type: string
config:
type: object
properties:
type:
type: string
enum:
- FUZZY
- EXACT
- RANGE
description: Determines the type of field
required:
- type
additionalProperties: false
description: Configuration options for the field
required:
- fieldId
additionalProperties: false
default: []
description: Advanced search fields.
required:
- title
additionalProperties: false
default: []
required:
- id
- summary
- label
- actions
- declaration
- workqueues
additionalProperties: false
"404":
description: User not found
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
default:
description: Default error
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
code:
type: string
message:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment