Comments (7)
I'm not sure if I can fix this, since there's no good definition of "false" in YAML. I think you need to take this with the author of YAML.
Please re-open if you have an idea for how to fix this or how to make a workaround.
from mojolicious-plugin-openapi.
i would think one of two things would work:
-
Translate the Yaml to Json, followed by populating the default value (so the default is applied to the json and not the yaml
-
Use introspection after the initial translation - if the type is "boolean" and has an invalid Boolean default it could refer to the original yaml doc and try to extract a truthy or falsey value to be re-applied
from mojolicious-plugin-openapi.
The swagger tools all seem to cope with this, so I would think they are doing something similar
from mojolicious-plugin-openapi.
I can't reopen this issue. Also even if you can't fix it I'm not sure you should close the issue as it only hides the problem from others who may encounter it.
from mojolicious-plugin-openapi.
I won't leave issues open that I can't fix.
The problem is that the YAML library converts the word "true" and "false" into something that isn't really a boolean value. What I would like is if the author of the YAML library would convert booleans into JSON::PP::false and ::true objects.
from mojolicious-plugin-openapi.
It's really just guesswork. At some point I considered dropping YAML support completely, but I kept supporting it, even if I don't like/use YAML myself.
from mojolicious-plugin-openapi.
Actually... You're right: In this case it's not guesswork. Sorry, I think vacation has made me confused :/
from mojolicious-plugin-openapi.
Related Issues (20)
- How can I add more definitions and paths to my application API from a Mojo plugin? HOT 4
- typo HOT 2
- Security - Several alternative methods HOT 1
- Just a quick copy from IRC HOT 1
- Can't call method "validator" on an undefined value HOT 5
- Schema for a default response HOT 7
- Automatic "DefaultResponse" injection does not work when path spec is inside a different file HOT 10
- Wrong error description if status not defined in the spec HOT 2
- "in: body" in parameters causes an error HOT 3
- How to use openapi with mojo's under method for a route HOT 1
- Posting an Array of Objects as a body parameter not supported in OpenAPI v2 HOT 5
- POD spelling errors HOT 1
- ->openapi->valid_input mangles headers HOT 1
- SpecRenderer escape characters HOT 1
- param in=>query, type=>array does not work anymore HOT 2
- Mojolicious::Lite silently ignores controller configurations due to missing default namespaces HOT 3
- [Mojolicious::Plugin::OpenAPI::Security] should use http status code 403 HOT 2
- Response-validation fails when using $ref for responses HOT 1
- empty responses should default to http status code 204 HOT 3
- url_for problem in Mojolicious::Plugin::OpenAPI::SpecRenderer V5.09 -> _render_spec with haproxy replace-path HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mojolicious-plugin-openapi.