-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for all Swagger Schema property definitions #52
Comments
These Schemas should be provided in schema-tools (metosin/schema-tools#16). |
Are PRs going to be accepted for this? For example |
Not everything be represented with Schemas (e.g. the Swagger Response definitions) without extending the Schema itself, but most common stuff works, so go ahead. |
There was more coverage before: 1acba7e |
Actually, would a full sample work better? like https://github.com/technomancy/leiningen/blob/master/sample.project.clj There is already the JSON Schema validator with Ring Swagger, which is 100% proof. |
I personally was looking for a full Schema schema so that I can use it in On Wed, Jan 27, 2016 at 2:39 PM, Tommi Reiman [email protected]
|
Hi Guys, any advice on this? I just started a project yesterday that would really benefit from this, I just would like to know why it was removed in the commit I linked to above so that hopefully whatever reason that was can be fixed? |
Hi, the schema was removed as it was not complete, would be an extra maintenance effort and wasn't that readable anymore (lot's of nesting & regex-stuff) and there was/is the JSON Schema validator, which is bullet-proof. But also understand you point-of-view, Schema would provide faster feedback-loop in the pure clojure land. I propose we'll have two schemas:
Could be in the same namespace, with just describing names. The users of the lib could use the more complete Schema if they wish. And if most people want to use that, could be the only version in the future. what do you think? if ok, looking forward to the PR :) |
ok, 1 problem I've come across is that |
Sorry, I understand what's going on. So my question is, should this schema I'm creating be the correct swagger spec? I think it should, then people (or possibly even ring-swagger) can use the coercion functions that already exist in ring-swagger to coerce whatever they have into a fully valid swagger schema. What do you think? |
The whole idea in ring-swagger is that you can work with the Prismatic Schemas under Did this answer your question? |
Hmm good point, no point in putting in the schema things that will always be the same for clojure values. Ok, that makes sense, I'll adjust accordingly. |
I've created #86 as a first attempt, please let me know what you think. |
#86 is already merged, let's reopen this if there is still need. |
thigs like
:maximum
,:minimum
etc. https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#schema-objectAlso,
schema.core/both
should try to merge in these definitions so that:would work.
The text was updated successfully, but these errors were encountered: