guardrail-dev / guardrail-dev/guardrail

Support for `default` HTTP response

Open
#96 18 comments 7 reactions 0 assignees View on GitHub
help wanted scala scala-akka-http scala-http4s
Dominant language
Scala
Stars
541
Forks
138
PR merge metrics
No merged PRs in 30d

Description

According to the [OpenAPI Spec 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) the `responses` section can declare a `default` response.

```yaml
responses:
'200':
description: Good things happened
default:
description: An error occurred.
schema:
$ref: '#/definitions/exception'
...
definitions:
exception:
type: object
required:
- code
properties:
code:
type: string
description:
type: string
```

When running codegen from sbt the following error is reported:

```
Unknown HTTP type: default
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.