{
  "swagger": "2.0",
  "info": {
    "title": "AvoinData codeScheme models",
    "version": "v1"
  },
  "paths": {
    "/api/CodeSchemeControllers": {
      "get": {
        "tags": [
          "CodeSchemeControllers"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/CodeScheme"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Code": {
      "description": "Code",
      "type": "object",
      "properties": {
        "id": {
          "format": "uuid",
          "description": "Id",
          "type": "string"
        },
        "codeValue": {
          "description": "Code value",
          "type": "string"
        },
        "status": {
          "description": "Code status",
          "type": "string"
        },
        "order": {
          "format": "int32",
          "description": "Code order",
          "type": "integer"
        },
        "hierarchyLevel": {
          "format": "int32",
          "description": "Hierarchy level",
          "type": "integer"
        },
        "startDate": {
          "format": "date-time",
          "description": "Code valid start date",
          "type": "string"
        },
        "endDate": {
          "format": "date-time",
          "description": "Code valid end date",
          "type": "string"
        },
        "created": {
          "format": "date-time",
          "description": "Created timestamp",
          "type": "string"
        },
        "modified": {
          "format": "date-time",
          "description": "Modified timestamp",
          "type": "string"
        },
        "prefLabel": {
          "$ref": "#/definitions/LocalizedText"
        },
        "prefAbbreviation": {
          "$ref": "#/definitions/LocalizedText"
        },
        "prefDescription": {
          "$ref": "#/definitions/LocalizedText"
        },
        "broaderCode": {
          "$ref": "#/definitions/Code"
        }
      }
    },
    "CodeScheme": {
      "type": "object",
      "properties": {
        "id": {
          "format": "uuid",
          "description": "Id",
          "type": "string"
        },
        "codeValue": {
          "description": "Code value",
          "type": "string"
        },
        "prefLabel": {
          "$ref": "#/definitions/LocalizedText"
        },
        "created": {
          "format": "date-time",
          "description": "Created timestamp",
          "type": "string"
        },
        "modified": {
          "format": "date-time",
          "description": "Modified timestamp",
          "type": "string"
        },
        "codes": {
          "description": "List of codes",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Code"
          }
        },
        "tags": {
          "description": "List of tags",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Tag"
          }
        }
      }
    },
    "LocalizedText": {
      "type": "object",
      "properties": {
        "fi": {
          "description": "Localized text fi-FI",
          "type": "string"
        },
        "sv": {
          "description": "Localized text sv-SE",
          "type": "string"
        },
        "en": {
          "description": "Localized text en-US",
          "type": "string"
        }
      }
    },
    "Tag": {
      "description": "Tag",
      "type": "object",
      "properties": {
        "id": {
          "format": "uuid",
          "description": "Id",
          "type": "string"
        },
        "text": {
          "description": "Text",
          "type": "string"
        }
      }
    }
  }
}