Skip to content
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

invalid json shoud be rejected #19

Open
evantill opened this issue Nov 13, 2014 · 4 comments
Open

invalid json shoud be rejected #19

evantill opened this issue Nov 13, 2014 · 4 comments

Comments

@evantill
Copy link

invalid json data should be rejected

invalid content (config_vars must be inside engine_args)

{
    "engine": "tesseract",
    "engine_args": {
        "lang": "fra",
        "psm": "3"
    },
      "config_vars": {
        "tessedit_create_hocr": "1",
        "tessedit_pageseg_mode": "1"
    },
    "img_url": "http://i.imgur.com/xYAaDjV.png"
}
@tleyden
Copy link
Owner

tleyden commented Nov 13, 2014

@evantill yup, agree 100%, thanks for pointing this out.

There's only one problem: the json schema is currently embedded in an apiary.apib file, and so it's not easy to pass that to a json schema validation library.

They're working on it in apiaryio/api-blueprint#20

@angrbrd
Copy link

angrbrd commented Aug 30, 2017

@tleyden just curious if the issue of rejecting an invalid JSON payload has ever been re-evaluated? Will this ever be addressed? At this time, an invalid payload to the mock server produces a message in the Apiary inspector log, but the request still goes through and returns a response. Thanks!

@tleyden
Copy link
Owner

tleyden commented Aug 31, 2017

Hi @angrbrd. Sorry, no progress or ETA on this yet, but I'll make sure to update the issue.

On this note, what would your thoughts be about moving from apiary to swagger? As a user would you prefer one over the other?

@angrbrd
Copy link

angrbrd commented Oct 6, 2017

@tleyden I do tend to prefer Swagger and it seems that it has grown in popularity and garnered enough support to have a larger user base now, as apposed to apiary (at least that's my personal impression). But there is always a transition period, that's the issue. We have a lot of Apiary blueprints that have yet to be converted over to Swagger, which is what is driving this exploration. Thanks for any help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants