openapi: 3.1.0
info:
  title: Newsletter service
  version: 0.1.0
paths:
  /newsletters/{username}:
    get:
      summary: Newsletters
      description: The newsletters an active customer receives, and in which language.
      operationId: newsletters_newsletters__username__get
      parameters:
      - name: username
        in: path
        required: true
        schema:
          type: string
          minLength: 1
          maxLength: 50
          title: Username
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscriptions'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Subscriptions:
      properties:
        username:
          type: string
          title: Username
        language:
          type: string
          title: Language
        newsletters:
          items:
            type: string
          type: array
          title: Newsletters
      type: object
      required:
      - username
      - language
      - newsletters
      title: Subscriptions
      description: The newsletters of one customer.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
