bellycard / napa

A simple framework for building APIs with Grape
Other
329 stars 72 forks source link

Api gen spec #88

Closed ckampfe closed 10 years ago

ckampfe commented 10 years ago

@jdoconnor I was going off of how it was done here and here and @darbyfrey 's advice to follow migration_spec.

Happy to change if there is another way that is preferable.

darbyfrey commented 10 years ago

@ckampfe this is a great start!

I think these tests should be a bit rigid in that we want to make sure the generator is creating a complete functional API according to our requirements. So, we should check for things like:

Some of this I'm not totally sure how to do, and you certainly don't have to do it all in one PR, but that's the sort of stuff I'm thinking.

Thoughts? @jdoconnor @dshemenski

jdoconnor commented 10 years ago

I'm fine getting rid of filter by hash On May 11, 2014 2:41 PM, "Darby Frey" notifications@github.com wrote:

@ckampfe https://github.com/ckampfe this is a great start!

I think these tests should be a bit rigid in that we want to make sure the generator is creating a complete functional API according to our requirements. So, we should check for things like:

  • The code evaluates in ruby without any syntax errors
  • The representer inherits from Napa::Representer
  • The model includes Napa::FilterByHash - @jdoconnorhttps://github.com/jdoconnor, do we want to continue to include that?
  • The api is using declared parameters and calling into the correct classes, etc.

Some of this I'm not totally sure how to do, and you certainly don't have to do it all in one PR, but that's the sort of stuff I'm thinking.

Thoughts? @jdoconnor https://github.com/jdoconnor @dshemenskihttps://github.com/dshemenski

— Reply to this email directly or view it on GitHubhttps://github.com/bellycard/napa/pull/88#issuecomment-42780694 .

ckampfe commented 10 years ago

@darbyfrey representer inherits from Napa::Representer

darbyfrey commented 10 years ago

Looks good!