Skip to content
Snippets Groups Projects
swagger-birthcertificate.yaml 2.96 KiB
Newer Older
Benguria Elguezabal, Gorka's avatar
Benguria Elguezabal, Gorka committed
openapi: 3.0.3
info:
  title: Birth Certificate Mock-API
  description: An API-Spec used for birth certificate.
  version: 0.1.0
servers:
  - url: https://ujse-mock-api-birth-cert-ujse-dev.k8s.across-h2020.eu
  #- url: http://localhost:8888/
paths:
  /my-application:
    post:
      summary: Issue birth certificate.
      description: Issue birth certificate for you or your minor children.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/requestBodies/My-application'
      responses:
        '201': # status code
          description: OK - Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/My-application'

  /children:
    get:
      summary: Retrieve list of self and children.
      description: Retrieve list of self and children.
      responses:
        '200':    # status code
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Children'

components:
  schemas:
    Children:
      type: array
      items:
        type: object
        properties:
          dropdownID:
            type: string
          data:
            type: array
            items:
              type: object
              properties:
                optionID:
                  type: integer
                optionVal:
                  type: array
                  items:
                    type: object
                    properties:
                      locale:
                        type: string
                      value:
                        type: string

    My-application:
      type: array
      items:
        type: object
        properties:
          outputId:
            type: integer
          title:
            type: string
          type:
            type: string
          language:
            type: string
          description:
            type: string
          contentType:
            type: string
          content:
            type: string


  requestBodies:
    My-application:
        type: object
        properties:
          afm:
            type: string
            required: true
            example: "123456789"
          dateofbirth:
            type: string
            format: date
            pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
            required: true
          firstname:
            type: string
            required: true
            example: "Michael"
          lastname:
            type: string
            required: true
            example: "George"
          fathersname:
            type: string
            required: true
            example: "Jordan"
          mothersname:
            type: string
            required: true
            example: "Mary"
          person:
            type: string
            required: true
            example: "0"
          email:
            type: string
            example: "mg@gmail.com"