openapi: "3.0.0"
info:
   version: "1.0.0"
   title: "Floricode webservices - Generic reusable components"
   termsOfService: "http://www.floricode.com/"
   contact:
      email: "info@floricode.com"
servers: []
paths: {}
components:
   parameters:
      id:
         name: "id"
         in: "path"
         description: "ID of the item to return"
         required: true
         schema:
            type: "integer"
            format: "int32"
      limit:
         name: "limit"
         in: "query"
         description: "Number of results to be returned"
         schema:
            type: "integer"
            format: "int32"
            minimum: 0
            exclusiveMinimum: true
            maximum: 1000
            exclusiveMaximum: false
            multipleOf: 10
            default: 100
      changeDateTime:
         name: "change_date_time"
         in: "query"
         description: "Filter on the field `change_date_time` of code list item"
         required: false
         schema:
            $ref: "#/components/schemas/filterValueDateTime"
      entryDate:
         name: "entry_date"
         in: "query"
         description: "Filter on the field `entry_date` of code list item"
         required: false
         schema:
            $ref: "#/components/schemas/filterValueDate"
      expiryDate:
         name: "epiry_date"
         in: "query"
         description: "Filter on the field `expiry_date` of code list item"
         required: false
         schema:
            $ref: "#/components/schemas/filterValueDate"
      page:
         name: "page"
         in: "query"
         description: "The number of the result page to be returned"
         schema:
            type: "integer"
            format: "int32"
            minimum: 0
            exclusiveMinimum: true
            multipleOf: 1
            default: 1
      sort:
         name: "sort"
         in: "query"
         description: "A comma separated list of fields the results must be sorted upon. With a semicolon after a field name, the sorting direction can be given. Sort direction is ascending by default."
         schema:
            type: "string"
            example:
               sort1:
                  summary: "Sort on field 'field1'"
                  description: "Results will be sorted ascending by 'field1'"
                  value: "field1"
               sort2:
                  summary: "Sort on field 'field1', ascending"
                  description: "Results will be sorted explicitly ascending by 'field1'"
                  value: "field1:asc"
               sort3:
                  summary: "Sort on multiple fields"
                  description: "Results will be sorted in this order: field6 ascending, field2 descending, field1 ascending."
                  value: "field6:asc,field2:desc,field1"
   schemas:
      "filterValue":
         title: "Basis of a filter value parameters"
         description: "A value consisting of one or more alphanumeric character, hyphen or underscore. A comparator (optional) can be prepended."
         type: "string"
         pattern: "^(=|>|<|>=|<|<=|<>)?(?!=|>|<|>=|<|<=|<>)(.)*$"
      "filterValueDate":
         title: "Basis of a value for a date filter parameter"
         description: "A comparator (optional) followed by a date value (yyyymmdd)"
         type: "string"
         pattern: "^(<=|>=|<>|\\!=|=|>|<)?[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$"
      "filterValueDateTime":
         title: "Basis of a value for a date time filter parameter"
         description: "A comparator (optional) followed by a date time value (yyyymmddhhii)"
         type: "string"
         pattern: "^(<=|>=|<>|\\!=|=|>|<)?[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])([0-1][0-9]|2[0-3])([0-5][0-9])$"
      "fieldDate":
         title: "Basis of a value for a date filter parameter"
         description: "A comparator (optional) followed by a date value (yyyymmdd)"
         type: "integer"
         format: "int64"   
         minimum: 19900101
         exclusiveMinimum: true
         maximum: 29991231
         exclusiveMaximum: false
         pattern: "^[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])$"
      "fieldDateTime":
         title: "Basis of a value for a date time filter parameter"
         description: "A comparator (optional) followed by a date time value (yyyymmddhhii)"
         type: "integer"
         format: "int64"   
         minimum: 199001010000
         exclusiveMinimum: true
         maximum: 299912312359
         exclusiveMaximum: false
         pattern: "^[0-9]{4}(0[1-9]|1[0-2])(0[1-9]|[1-2][0-9]|3[0-1])([0-1][0-9]|2[0-3])([0-5][0-9])$"