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

Schema and programmatic API #27

Open
bredele opened this issue Oct 20, 2017 · 1 comment
Open

Schema and programmatic API #27

bredele opened this issue Oct 20, 2017 · 1 comment

Comments

@bredele
Copy link
Contributor

bredele commented Oct 20, 2017

Should we apply schema for the programmatic API?

api.get('/', {
  name: 'bob'
})

It would mean that the programmatic API should also return a stream (or promise). Except if the schema library we are using does not return a promise.

@bredele
Copy link
Contributor Author

bredele commented Oct 20, 2017

We could also implement a request method that simulates a HTTP request in order to call the schema.

// call method get without schema
api.get('/', {
  name: 'bob'
})

// call method get with schema
api.request('get', '/', {
  name: 'bob'
}) 

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

No branches or pull requests

1 participant