- Correct the type of list inputs from
list
toarray
- Stricer validation on report arguments
- Fix a bad report argument
- Adds more description to the error raised if you try to use a non-reporting output type as the output of a field
- Add a lot more documentation for the reporting interface in
docs/reporting.md
- Added a better
#message
toSoberSwag::Reporting::Report::Error
- Added
SoberSwag::Reporting
, which is basically a v2 of the gem! Docs for this can be found in [docs/reporting.md].
- Added a new method of serializing views based on hash lookups, improving performance
- Added a benchmarking suite
- Added
except
parameter to themerge
method, which allows a specified field to be excluded from the merge. - Add
type_key
to output objects, for easily serializing out type fields with a constant string. - Added
type_attribute
toSoberSwag::InputObject
to add easy constant-value disambiguation.
- Added YARD documentation to almost every method
- Use redoc for generated documentation UI
- Add generic hash type for primitive types
- Allow tagging endpoints via the new
tags
method.
- Allow non-class types to be used as the inputs to controllers
v0.15.0: 2020-09-02
- Add a new
#merge
method to output objects, which will merge fields from another output object into the given output object. - Add
multi
to Output Objects, as a way to define more than one field of the same type at once. - Add an
inherits:
key to output objects, for view inheritance. - Add
SoberSwag::Types::CommaArray
, which parses comma-separated strings into arrays. This also setsstyle
toform
andexplode
tofalse
when generating Swagger docs. This class is mostly useful for query parameters where you want a simpler format:tag=foo,bar
instead oftag[]=foo,tag[]=bar
. - Add support for using
meta
to specify alternativestyle
andexplode
keys for query and path params. Note that this support does not extend to parsing: If you modify thestyle
orexplode
keywords, you will need to make those input formats work with the actual type yourself.
- No longer swallow
Dry::Struct
errors, instead let them surface to the user.