hgwood / fanfaron Goto Github PK
View Code? Open in Web Editor NEWA no-surprise Java model of the Swagger 2.0 specification
License: MIT License
A no-surprise Java model of the Swagger 2.0 specification
License: MIT License
As of 6.3.0, I believe the only gap remaining between Fanfaron and the spec resides in the type of the items
field of the Schema Object. The spec says it can either be a Schema Object, or an array of Schema Objects.
This looks like it could be solved using the same technique as with AdditionalProperties
: two constructors annotated with @JsonCreator
, one for each possibility. However, Jackson does not support two delegate creators for composite values, and will always select one or the other regardless of the JSON value, then fail at runtime. I don't know if there is a reason for that limitation. I'm looking into it.
An alternative solution would be to have a creator that takes a JsonNode
as a parameter, and work with that. The downside is that Jackson Databind would become a compile dependency. I don't really like the idea of requiring this big library just for that.
TODO: mvn deploy
Would decrease code mass and maintenance costs, while providing a more standard API with getters and builder-style setters.
Swagger swagger = new Swagger();
swagger.info = new Info();
Swagger withDefaults = new DefaultFiller().fillDefaults(swagger);
withDefaults.info
is null
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.