Conversation
| noIndentation(actualYaml) shouldBe load("expected_extensions.yml") | ||
| } | ||
|
|
||
| test("should match the expected json with schema dialect") { |
There was a problem hiding this comment.
as these are not tests of the openapi interpreter, but for the serialisation of customly enhanced OpenAPI objects, I'd move those to the openapi-model module
There was a problem hiding this comment.
or rather, since we are testing serialisation, the appropriate place would be openapi-circe-yaml - where the encoders/decoders for the OpenAPI data type are defined
There was a problem hiding this comment.
Moved to module openapi-circe - the encoders/decoders are there :)
| "io.circe" %% "circe-parser" % Versions.circe, | ||
| "io.circe" %% "circe-generic" % Versions.circe | ||
| "io.circe" %% "circe-generic" % Versions.circe, | ||
| "io.circe" %% "circe-yaml" % Versions.circeYaml, |
There was a problem hiding this comment.
why are we adding yaml dependencies to this module? there's a dedicated module w/ yaml dependencies just below
|
|
||
| trait TapirOpenAPICirceToYaml { | ||
| implicit class RichOpenAPI(openAPI: OpenAPI) { | ||
| def convertToYaml: String = Printer(dropNullKeys = true, preserveOrder = true).pretty(openAPI.asJson) |
There was a problem hiding this comment.
isn't it the same functionality as .toYaml? Why would this be in the main sources?
If decoding of an endpoint's input may fail, the endpoint may respond with a 400 status code. Provide a default 400 response for each such endpoint in OpenAPI docs to make them more consistent with the actual endpoint behavior. * feat(openapi): add default 400 output to OpenAPIDocsOptions * wip: make default 400 a func input => Option[output] * wip: use FailureMessages.failureSourceMessage * wip: refactor * wip: rename to defaultDecodeFailureOutput * wip: enhance fallible input detection * wip: fix json and security tests * wip: fix yaml coproduct test * wip: fix all tests * wip: refactor * wip: extract tests * wip: check for required inputs * refactor: extract EndpointInputToDecodeFailureOutput * wip: exclude auth headers * wip: add test for no response * docs: add info about defaultDecodeFailureOutput
|
I will close this one and open same changes in another PR: #1223 |
No description provided.