razum2um / lurker

📖 The ultimate tool for documenting and testing APIs in Rails
https://lurker.razum2um.me/lurker
MIT License
116 stars 22 forks source link

Support request media type configuration for an API service. #102

Closed nebolsin closed 9 years ago

nebolsin commented 9 years ago

Service can specify several media types which it can consume as an input.

 ---
  basePath: ''
  description: ''
  name: Lurker Demo Application
  domains: {}
  extensions: {}
  consumes:
  - application/x-www-form-urlencoded
  - application/json

Generated browsable HTML documentation allows user to select from the consumable media types and generate requests and cURL templates appropriately.

If no consumes key is present in the service config, then it's assumed to be application/x-www-form-urlencoded.

razum2um commented 9 years ago

@nebolsin 1) avoid commiting lib/lurker/templates/public/application.css and lib/lurker/templates/public/application.js - I precompile them by myself before release 2) squash it into a single commit, please