coub / raml_ruby

Raml Ruby
MIT License
93 stars 27 forks source link

Generic media type */* should be valid #14

Closed nogates closed 9 years ago

nogates commented 9 years ago

I think it would be great to allow a generic media type for bodies. As it says in RAML spec:

For APIs without a priori knowledge of the response types for their responses, "*/*" MAY be used to indicate that responses that do not matching other defined data types MUST be accepted. Processing applications MUST match the most descriptive media type first if "*/*" is used. https://github.com/raml-org/raml-spec/blob/master/raml-0.8.md#responses

I didn't want to alter the regular expression because then "application/*" could become a valid media type and I don't think it should be.

Thanks for taking the time to build the ruby raml parser :)

kgorin commented 9 years ago

Hi David!

Can we get some refactoring done in that method, so that the line won't be as long?

Thanks, Kirill

/cc @nogates

nogates commented 9 years ago

Can we get some refactoring done in that method, so that the line won't be as long?

done!