components:
  headers:
    API-Version:
      description: De API-versie van de response
      example: 1.0.0
      explode: false
      schema:
        example: 1.0.0
        type: string
      style: simple
  responses:
    "404":
      description: Resource does not exist
      headers:
        API-Version:
          description: De API-versie van de response
          example: 1.0.0
          explode: false
          schema:
            example: 1.0.0
            type: string
          style: simple
  schemas:
    ModelsKeycloakClientResult:
      example:
        apiKey: apiKey
      properties:
        apiKey:
          type: string
      type: object
    ModelsLintMessage:
      example:
        code: code
        createdAt: "2000-01-23T04:56:07.000Z"
        id: id
        infos:
        - id: id
          lintMessageId: lintMessageId
          message: message
          path: path
        - id: id
          lintMessageId: lintMessageId
          message: message
          path: path
        severity: severity
      properties:
        code:
          type: string
        createdAt:
          format: date-time
          type: string
        id:
          type: string
        infos:
          items:
            example:
              id: id
              lintMessageId: lintMessageId
              message: message
              path: path
            properties:
              id:
                type: string
              lintMessageId:
                type: string
              message:
                type: string
              path:
                type: string
            type: object
          type: array
        severity:
          type: string
      type: object
    ModelsLintMessageInfo:
      example:
        id: id
        lintMessageId: lintMessageId
        message: message
        path: path
      properties:
        id:
          type: string
        lintMessageId:
          type: string
        message:
          type: string
        path:
          type: string
      type: object
    ModelsLintResult:
      example:
        apiId: apiId
        createdAt: "2000-01-23T04:56:07.000Z"
        failures: 0
        id: id
        messages:
        - code: code
          createdAt: "2000-01-23T04:56:07.000Z"
          id: id
          infos:
          - id: id
            lintMessageId: lintMessageId
            message: message
            path: path
          - id: id
            lintMessageId: lintMessageId
            message: message
            path: path
          severity: severity
        - code: code
          createdAt: "2000-01-23T04:56:07.000Z"
          id: id
          infos:
          - id: id
            lintMessageId: lintMessageId
            message: message
            path: path
          - id: id
            lintMessageId: lintMessageId
            message: message
            path: path
          severity: severity
        score: 6
        successes: true
      properties:
        apiId:
          type: string
        createdAt:
          format: date-time
          type: string
        failures:
          format: int32
          type: integer
        id:
          type: string
        messages:
          items:
            example:
              code: code
              createdAt: "2000-01-23T04:56:07.000Z"
              id: id
              infos:
              - id: id
                lintMessageId: lintMessageId
                message: message
                path: path
              - id: id
                lintMessageId: lintMessageId
                message: message
                path: path
              severity: severity
            properties:
              code:
                type: string
              createdAt:
                format: date-time
                type: string
              id:
                type: string
              infos:
                items:
                  example:
                    id: id
                    lintMessageId: lintMessageId
                    message: message
                    path: path
                  properties:
                    id:
                      type: string
                    lintMessageId:
                      type: string
                    message:
                      type: string
                    path:
                      type: string
                  type: object
                type: array
              severity:
                type: string
            type: object
          type: array
        score:
          format: int32
          type: integer
        successes:
          type: boolean
      type: object
    OASInput:
      example:
        oasBody: oasBody
        oasUrl: oasUrl
        targetVersion: "3.1"
      properties:
        oasBody:
          type: string
        oasUrl:
          type: string
        targetVersion:
          description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie: 2.0
            of 2.1.'
          type: string
      type: object
    UntrustClientInput:
      example:
        email: email
      properties:
        email:
          type: string
      type: object
  securitySchemes:
    apiKey:
      in: header
      name: X-API-Key
      type: apiKey
    clientCredentials:
      flows:
        clientCredentials:
          scopes:
            tools:read: Toegang tot de tools endpoints
          tokenUrl: https://auth.don.apps.digilab.network/realms/don/protocol/openid-connect/token
      type: oauth2
info:
  contact:
    email: developer.overheid@geonovum.nl
    name: Team developer.overheid.nl
    url: https://github.com/developer-overheid-nl/don-tools-api/issues
  description: API van het Tools (apis.developer.overheid.nl)
  title: Tools API v1
  version: 1.0.0
openapi: 3.1.0
paths:
  /v1/arazzo/markdown:
    post:
      description: 'Genereert alleen de Markdown-uitvoer van een Arazzo specificatie.
        Body: { oasUrl|oasBody }'
      operationId: arazzoMarkdown
      requestBody:
        content:
          application/json:
            schema:
              example:
                oasBody: oasBody
                oasUrl: oasUrl
                targetVersion: "3.1"
              properties:
                oasBody:
                  type: string
                oasUrl:
                  type: string
                targetVersion:
                  description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie:
                    2.0 of 2.1.'
                  type: string
              type: object
      responses:
        "200":
          content:
            text/markdown:
              schema:
                type: string
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Arazzo Markdown (POST)
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
  /v1/arazzo/mermaid:
    post:
      description: 'Genereert alleen de Mermaid flowchart van een Arazzo specificatie.
        Body: { oasUrl|oasBody }'
      operationId: arazzoMermaid
      requestBody:
        content:
          application/json:
            schema:
              example:
                oasBody: oasBody
                oasUrl: oasUrl
                targetVersion: "3.1"
              properties:
                oasBody:
                  type: string
                oasUrl:
                  type: string
                targetVersion:
                  description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie:
                    2.0 of 2.1.'
                  type: string
              type: object
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Arazzo Mermaid (POST)
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
  /v1/auth/clients:
    post:
      description: Maak een client aan via de admin API. Body bevat Email.
      operationId: untrustClient
      requestBody:
        content:
          application/json:
            schema:
              example:
                email: email
              properties:
                email:
                  type: string
              type: object
      responses:
        "200":
          content:
            application/json:
              schema:
                example:
                  apiKey: apiKey
                properties:
                  apiKey:
                    type: string
                type: object
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Maak client (POST)
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
  /v1/oas/bundle:
    post:
      description: 'Bundelt een OpenAPI specificatie en lost externe verwijzingen
        op. Body: { oasUrl } of { oasBody }.'
      operationId: bundleOAS
      requestBody:
        content:
          application/json:
            schema:
              example:
                oasBody: oasBody
                oasUrl: oasUrl
                targetVersion: "3.1"
              properties:
                oasBody:
                  type: string
                oasUrl:
                  type: string
                targetVersion:
                  description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie:
                    2.0 of 2.1.'
                  type: string
              type: object
      responses:
        "200":
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Bundle OpenAPI
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
  /v1/oas/convert:
    post:
      description: 'Converteert OpenAPI naar de laatst ondersteunde versie (standaard
        3.1). Meegegeven targetVersion (3.0 of 3.1) bepaalt het doel. Body: { oasUrl
        } of { oasBody } (stringified JSON of YAML).'
      operationId: convertOAS
      requestBody:
        content:
          application/json:
            schema:
              example:
                oasBody: oasBody
                oasUrl: oasUrl
                targetVersion: "3.1"
              properties:
                oasBody:
                  type: string
                oasUrl:
                  type: string
                targetVersion:
                  description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie:
                    2.0 of 2.1.'
                  type: string
              type: object
      responses:
        "200":
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Converteer OpenAPI 3.0/3.1
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
      x-original-operationId: ConvertOAS
  /v1/oas/generate:
    post:
      description: 'Genereert een boilerplate OpenAPI specificatie op basis van JSON-invoer.
        Body: { oasUrl } of { oasBody } (stringified JSON).'
      operationId: generateOAS
      requestBody:
        content:
          application/json:
            schema:
              example:
                oasBody: oasBody
                oasUrl: oasUrl
                targetVersion: "3.1"
              properties:
                oasBody:
                  type: string
                oasUrl:
                  type: string
                targetVersion:
                  description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie:
                    2.0 of 2.1.'
                  type: string
              type: object
      responses:
        "200":
          content:
            application/json:
              schema:
                type: object
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Generate OpenAPI
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
      x-original-operationId: GenerateOAS
  /v1/oas/postman:
    post:
      description: 'Converteert OpenAPI naar Postman Collection JSON. Body: { oasUrl
        } of { oasBody } (stringified JSON of YAML).'
      operationId: createPostmanCollection
      requestBody:
        content:
          application/json:
            schema:
              example:
                oasBody: oasBody
                oasUrl: oasUrl
                targetVersion: "3.1"
              properties:
                oasBody:
                  type: string
                oasUrl:
                  type: string
                targetVersion:
                  description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie:
                    2.0 of 2.1.'
                  type: string
              type: object
      responses:
        "200":
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Maak Postman-collectie (POST)
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
      x-original-operationId: CreatePostmanCollection
  /v1/oas/validate:
    post:
      description: 'Valideert een OpenAPI specificatie met de DON ADR ruleset. Standaard
        wordt ruleset 2.1 gebruikt; geef targetVersion "2.0" of "2.1" mee om een versie
        te kiezen. Body: { oasUrl } of { oasBody } (stringified JSON of YAML).'
      operationId: validatorOpenAPIPost
      requestBody:
        content:
          application/json:
            schema:
              example:
                oasBody: oasBody
                oasUrl: oasUrl
                targetVersion: "3.1"
              properties:
                oasBody:
                  type: string
                oasUrl:
                  type: string
                targetVersion:
                  description: 'Doelversie. Voor conversie: 3.0 of 3.1. Voor validatie:
                    2.0 of 2.1.'
                  type: string
              type: object
      responses:
        "200":
          content:
            application/json:
              schema:
                example:
                  apiId: apiId
                  createdAt: "2000-01-23T04:56:07.000Z"
                  failures: 0
                  id: id
                  messages:
                  - code: code
                    createdAt: "2000-01-23T04:56:07.000Z"
                    id: id
                    infos:
                    - id: id
                      lintMessageId: lintMessageId
                      message: message
                      path: path
                    - id: id
                      lintMessageId: lintMessageId
                      message: message
                      path: path
                    severity: severity
                  - code: code
                    createdAt: "2000-01-23T04:56:07.000Z"
                    id: id
                    infos:
                    - id: id
                      lintMessageId: lintMessageId
                      message: message
                      path: path
                    - id: id
                      lintMessageId: lintMessageId
                      message: message
                      path: path
                    severity: severity
                  score: 6
                  successes: true
                properties:
                  apiId:
                    type: string
                  createdAt:
                    format: date-time
                    type: string
                  failures:
                    format: int32
                    type: integer
                  id:
                    type: string
                  messages:
                    items:
                      example:
                        code: code
                        createdAt: "2000-01-23T04:56:07.000Z"
                        id: id
                        infos:
                        - id: id
                          lintMessageId: lintMessageId
                          message: message
                          path: path
                        - id: id
                          lintMessageId: lintMessageId
                          message: message
                          path: path
                        severity: severity
                      properties:
                        code:
                          type: string
                        createdAt:
                          format: date-time
                          type: string
                        id:
                          type: string
                        infos:
                          items:
                            example:
                              id: id
                              lintMessageId: lintMessageId
                              message: message
                              path: path
                            properties:
                              id:
                                type: string
                              lintMessageId:
                                type: string
                              message:
                                type: string
                              path:
                                type: string
                            type: object
                          type: array
                        severity:
                          type: string
                      type: object
                    type: array
                  score:
                    format: int32
                    type: integer
                  successes:
                    type: boolean
                type: object
          description: OK
          headers:
            API-Version:
              description: De API-versie van de response
              explode: false
              schema:
                type: string
              style: simple
        "404":
          description: Not Found
      security:
      - apiKey: []
        clientCredentials:
        - tools
      summary: Validate OpenAPI (POST)
      tags:
      - Tools
      x-eov-operation-handler: controllers/ToolsController
servers:
- description: Production
  url: https://api.developer.overheid.nl/tools/v1
- description: Test
  url: https://api-register.don.apps.digilab.network/tools/v1
tags:
- description: Tools API V1 routes
  name: API v1
- description: Conversies en hulpmiddelen
  name: Tools
