# Copyright 2021 - 2021 PeopleWare n.v.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

x-summary: >-
  Missing required headers, query parameters, or body, or malformed header values, query parameter values or body.
description: >-
  Details about what exactly is wrong are provided in the body of the response.


  The returned `x-flow-id` and `x-mode` header values are the same as in the request, if they are available.


  If there is no `x-flow-id` in the request, or if it is malformed, the service generates a random UUID itself, and
  returns that. Therefor, a `400` response always has an `x-flow-id` header.


  If there are authNZ issues, those take precedence, and a `401` or `403` is returned instead. If there is a valid
  `authorization` token, but there is no `x-mode` in the request, or if it is malformed, authorization is impossible,
  and a `403` is returned. Therefor, a `400` response always has an `x-mode` header.
headers:
  x-flow-id:
    required: true
    schema:
      $ref: '../id/UUID.yaml'
  x-mode:
    required: true
    schema:
      $ref: '../id/mode.yaml'
  x-date:
    required: true
    schema:
      $ref: 'date.yaml'
