﻿openapi: 3.0.4
info:
  title: TestApp | v1
  version: 1.0.0
servers:
  - url: http://localhost
paths:
  /hello:
    get:
      tags:
        - TestApp
      parameters:
        - name: name
          in: query
          description: The name of the person to greet.
          schema:
            type: string
          example: Martin
      responses:
        '200':
          description: A greeting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Greeting'
              example:
                text: 'Hello, World!'
        '400':
          description: No name was provided.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
              example:
                type: https://tools.ietf.org/html/rfc9110#section-15.6.1
                title: Internal Server Error
                status: 500
                detail: An internal error occurred.
                instance: /hello
components:
  schemas:
    Greeting:
      type: object
      properties:
        text:
          type: string
          description: The text of the greeting.
          nullable: true
      description: Represents a greeting.
      example:
        text: 'Hello, World!'
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      example:
        type: https://tools.ietf.org/html/rfc9110#section-15.6.1
        title: Internal Server Error
        status: 500
        detail: An internal error occurred.
        instance: /hello
tags:
  - name: TestApp