{
  "openapi": "3.0.1",
  "info": {
    "title": "RID Generator Service",
    "description": "Rest Endpoints for operations related to RID generation",
    "license": {
      "name": "Mosip",
      "url": "https://docs.mosip.io/platform/license"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "http://localhost:8090/app/generic",
      "description": "RID Generator Service"
    }
  ],
  "tags": [
    {
      "name": "ridgenerator",
      "description": "Operation related to RID generation"
    }
  ],
  "paths": {
    "/generate/rid/{centerid}/{machineid}": {
      "get": {
        "tags": [
          "ridgenerator"
        ],
        "summary": "This endpoint handles the RID generation",
        "description": "This endpoint handles the RID generation",
        "operationId": "generateRid",
        "parameters": [
          {
            "name": "centerid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "machineid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success or you may find errors in error array in response",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseWrapperRidGeneratorResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ResponseWrapperRidGeneratorResponseDto": {
        "required": [
          "response"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "responsetime": {
            "type": "string",
            "format": "date-time"
          },
          "metadata": {
            "type": "object"
          },
          "response": {
            "$ref": "#/components/schemas/RidGeneratorResponseDto"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ServiceError"
            }
          }
        }
      },
      "RidGeneratorResponseDto": {
        "type": "object",
        "properties": {
          "rid": {
            "type": "string"
          }
        }
      },
      "ServiceError": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}