grape-swagger
grape-swagger copied to clipboard
Add OAPI/swagger v2.0 compliant documentation to your grape API
https://github.com/ruby-grape/grape-swagger/issues/904#issue-1881746890 As described in https://docs.swagger.io/spec.html minimum | string | number, integer | The minimum valid value for the type, inclusive. If this field is used in conjunction with the defaultValue...
Currently, `grape-swagger` does not support query array parameters, setting them to `formData` by default: https://github.com/ruby-grape/grape-swagger/blob/master/lib/grape-swagger/doc_methods/parse_params.rb#L87 ``` def document_array_param(value_type, definitions) if value_type[:documentation].present? param_type = value_type[:documentation][:param_type] doc_type = value_type[:documentation][:type] type = DataType.mapping(doc_type)...
https://github.com/ruby-grape/grape-swagger/blob/3a5da56fb3ad19dcb07cf3ef86549bb811e22dcc/lib/grape-swagger/doc_methods/parse_params.rb#L165C67-L165C67 As described in https://docs.swagger.io/spec.html > **minimum** | string | **number**, integer | The minimum valid value for the type, inclusive. If this field is used in conjunction with the ...
I have implemented Grape swagger to load all the Grape APIs to save them as documentation and manipulate data using these API. Unfortunately, I am unable to load any API...
If a client-defined route contains `doc` word, then the call to that URL will be unexpectedly performed Let's filter the routes using `swagger_doc` instead
This adds support for optional path segments in rails as per #878 by recursively including/excluding optional path segments in parentheses. Additionally, this modifies the `PathString.build` method due to the need...
As per #721, `grape-swagger` sets the default `consumes` to `['application/json']` in `lib/grape-swagger/doc_methods/produces_consumes.rb`: ``` return ['application/json'] unless args.flatten.present? ``` However, it also sets the default `in` of parameters to `formData` in...
As per #881, this adds a check if any of the parameters are of `file` type and if `consumes` is not set to either `application/x-www-form-urlencoded` or `multipart/form-data`, it will set...
As per https://github.com/ruby-grape/grape-swagger/issues/884, `grape-swagger` adds the `example` value even for non-schema object parameters, which leads to invalid OpenAPI during validation. I.e., the example keyword should not appear in any parameters...