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

Check objects for API calls #2756

Closed
sebgie opened this issue May 14, 2014 · 0 comments
Closed

Check objects for API calls #2756

sebgie opened this issue May 14, 2014 · 0 comments
Labels
affects:api Affects the Ghost API

Comments

@sebgie
Copy link
Contributor

sebgie commented May 14, 2014

Refs #2187 & #2697

We currently do not check the object of an API call for allowed or required properties before processing it. If the check fails there are two possible error states this could lead to:

Example (structure wrong):
PUT /ghost/api/v0.1/posts/1

{
    id: 1,
    post: [{...}]
}
  • ValidationError (422): JSON structure is valid but a property is missing/not allowed. This will probably require to define a list of required and optional properties. Maybe it is a good idea to derive/include this list from/in schema.js and use it with our validation?

Example (my-markdown not allowed):
PUT /ghost/api/v0.1/posts/1

{
    posts:[{
        id: 1,
        my-markdown: '...',
        ...
    }] 
}
@ErisDS ErisDS added the api label May 14, 2014
@ErisDS ErisDS added this to the Future milestone May 14, 2014
@ErisDS ErisDS added later [triage] Things we intend to work but are not immediate priority apps and removed apps later [triage] Things we intend to work but are not immediate priority labels Jun 26, 2015
@ErisDS ErisDS mentioned this issue Jun 30, 2015
31 tasks
@ErisDS ErisDS modified the milestone: Current Backlog Oct 9, 2015
@ErisDS ErisDS mentioned this issue Oct 20, 2015
24 tasks
@ErisDS ErisDS added the later [triage] Things we intend to work but are not immediate priority label Sep 20, 2016
@ErisDS
Copy link
Member

ErisDS commented Sep 20, 2016

I'm closing most API issues temporarily with the later label.

JSON API Overhaul & OAuth access are currently scheduled next on the roadmap

@ErisDS ErisDS closed this as completed Sep 20, 2016
@ErisDS ErisDS removed later [triage] Things we intend to work but are not immediate priority labels Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API
Projects
None yet
Development

No branches or pull requests

2 participants