Comments (4)
Thank you for raising this issue, tagless JSON behavior is indeed important aspect. And unfortunately might be not smooth enough in this library.
One of the potential problems (as far as I remember, did not check the code on this) is that in some places there are checks like hasJSONFields
based on the presence of json
tags which guides decision on whether the structure should be treated as JSON or a form data. This is not a blocker, but it may need some logic re implementation to properly support tagless JSON.
Please feel free to share more issues/details on your experience with tagless approach, it would be very useful to inform proper implementation.
from openapi-go.
OK found a workaround via:
myreflo.JSONSchemaReflector().DefaultOptions = append(myreflo.JSONSchemaReflector().DefaultOptions, jsonschema.ProcessWithoutTags)
Guess that closes this Issue (your call! =), though this progress now has me stuck on #91 ...
from openapi-go.
Ah, in that case, might be best to "capture them" earliest right during the first struct reflect
ion, ie. adding the implied-by-its-absence "default tag" at runtime as if it was explicitly there, iif it indeed wasn't. (Perhaps behind an option if preferred.)
from openapi-go.
Done in #93.
from openapi-go.
Related Issues (20)
- Error with UnmarshalYAML() using http/bearer auth scheme HOT 9
- I notice the code in readme that "reflector.SetRequest is deprecated" HOT 1
- setupRequest doesn't work with jsonschema.Struct HOT 2
- The OAS definition produced for []bytes seems to be wrong HOT 2
- Unmarshal failed to openAI spec HOT 1
- checkJSONBodyContentType failed to tolerate multipart/form-data with boundary HOT 2
- Incorrect "null" type (should use nullable property) HOT 1
- Improving the regular expression used to remove gorilla.mux-style regexp in paths HOT 3
- pathItem has a wrong key when using regexes. HOT 1
- Security schemes validation error HOT 2
- [Question] Is there a way to select if a struct schema is a ref or not ? HOT 3
- How to use custom x- tags in a schema HOT 3
- Changes to UUID schema generation HOT 6
- req/resp struct using generic could cause semantic error in openapi output HOT 4
- Doc page gets 404 when getting swagger-ui assets HOT 9
- Better discriminator support? HOT 1
- Issue with self-referencing entites HOT 1
- Method designed without params/placeholders throws "missing path parameter placeholder in url"? HOT 3
- Set response and request schemas without declared structure? HOT 6
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 openapi-go.