Commit Graph

64 Commits

Author SHA1 Message Date
Andrei Subbota 3e842a138b
Dependencies update (#948)
* Add spec route helper to complain with Grape >= 2.3.0

* Explicitly add ostruct gem in case of Ruby 3.5

* Update CHANGELOG
2025-02-19 09:25:58 -05:00
Suzuki Eiji ceebbd3469
fix: Use mount_path to narrow down urls_for (#924) 2024-04-26 07:10:24 +02:00
Andrei Subbota b75ce7f77d
Allow DELETE to have a params schema definition (#923) 2024-04-25 07:39:46 +02:00
Dhruv Paranjape e5090b66ac
fix parsing endless range values (#896) 2023-05-08 14:36:46 +02:00
peter scholz 557df89f82
Uses Ruby 3.2 (#889)
* Updates GH action matrix.

* Improves Actions.

* Updates matrix to use runy 3.2
2023-02-19 15:02:15 +01:00
Paul Padier 1a3e3f5889
Allow using nicknames for body definitions (#862)
* Fix typo

* Refactor MoveParams.parent_definition_of_params to use OperationId.build rather than OperationId.manipulate

This means it'll use route nicknames if those are available. It also means route parameters will be used in the definition names.

* Simplify MoveParams.build_body_parameter

MoveParams.build_definition returns the passed in name, so name and referenced_definition were always the same value.

* Fix Rubocop offenses

* Fix old reference to Travis CI in CONTRIBUTING

* Fix CHANGELOG

* Update CHANGELOG and UPGRADING
2022-07-26 09:44:42 +02:00
Vachman db76f42cc8
Refactor oapi fetch task (#846)
* oapi rake task generate specs for different API versions

* Refactor oapi:fetch rake task generate specs per file

* Fixing specs

* CHANGELOG.md

* Rubocop auto gen config

* Update README.md

* Satisfy rubocop
2022-03-11 19:31:24 +01:00
Hermann Mayer ed07bafd6c
Corrected the related parameter lookup on request params. (#822)
Signed-off-by: Hermann Mayer <hermann.mayer92@gmail.com>

Co-authored-by: peter scholz <pscholz.le@gmail.com>
2021-03-16 09:14:02 +01:00
peter scholz 08b8c2fe05
Prepare release 1.3.0 (#808)
- updates and satisfy rubocop 0.90
- fixes ruby warnings
- adds truffelruby-head to travis
2020-09-05 00:52:12 +02:00
Edward Rudd 3cb37fe9f3
Allow entity_name to be called on parent classes (#794)
This resolves issue #659.
2020-07-01 21:00:30 +02:00
Mikhail Doronin 05939a068a
Allow passing class name as a string for rake task initializer (#782)
It may be possible that API classes are not yet loaded
when the oapi rake tasks are initialized in Rakefile.

Add a possibility to pass class name as a string to not mess with class loader configuration.

Co-authored-by: Mikhail Doronin <mikhail.doronin@capitainetrain.com>
2020-03-23 19:14:26 +01:00
peter scholz 1ce0b5f795 Make usage of grape >= 1.3 (#777)
* Replaces Virtus by dry-type.

* Makes usage of rack ~> 2.1

* Adds changelog entry.

- adapts travis config
2020-02-09 23:30:21 +01:00
Edward Rudd 8abddd5f2c allow token_owner to be passed to the hidden proc for parameters as well (#775) 2020-02-09 23:10:32 +01:00
Nick Bienko 2c630b3861 Replace downcase with underscore for multi-word roots (#764)
Co-authored-by: peter scholz <pscholz.le@gmail.com>
2020-01-03 18:51:36 +01:00
peter scholz 45590937f9
Uses ruby 2.7 (#768)
* Prepare next release

- bump version
- updates travis matrix to newest ruby versions
- removes deprecation warnings of swagger-entity and -representable

* Uses Ruby 2.7

- adepts specs
- changes method signature
- fixes grape version to 1.2.5 -> will be the last release to support it
- adds CHANGELOG entry
2020-01-03 18:33:31 +01:00
Tim Galeckas 3de44a3a6f GrapeSwagger::DocMethods::Extensions breaks the contract of Kernel#method (#760)
* GrapeSwagger::DocMethods::Extensions breaks the contract of

Kernel#method

This causes code inspection tools and development workflows to break
and may cause developers to choose not to use the gem.

* add test for method introspection on GrapeSwagger::DocMethods::Extensions

* fix ci lint failure
2019-10-03 10:47:16 +02:00
Nick Bienko d7bf077802 Fix array_use_braces for body params (#757)
Previously this is what was generated:
`"attr":{"type":"array","items":{"type":"object","properties":{"":{"type":"string"}}}}`
instead of
`"attr":{"type":"array","items":{"type":"string"}}`
in case this attribute was nested in a Hash attribute with "body" in `param_type`
2019-09-06 12:04:56 +02:00
Gwénaël Rault 445d2d471d Deeply nested objects (#752)
* Depply nested objects

* Simple hash syntax edit

* Nested objects are not necessary arrays

* fix points test

* Fix test services

* Doesn't require to delete hash or array properties

* Edit nested logic

* Add vehicle test

* Change parameter level is endpoint job

* Array body shouldn't lost array type

* no more parser role

* array of array to array of string

* move format data

* fix formdata return

* Moved params_parser role spec

* Move endpoint spec

* Revert "Add vehicle test"

This reverts commit e5ba63ba26.

* remove redundant interpolation
2019-08-06 14:22:14 +02:00
Robert Schulze c1b81a2d11 Fix path with optional format (#746)
* Fix path with optional format

* rename to new cop name

* auto-fix rubocop offenses

* Update CHANGELOG.md
2019-06-06 16:58:16 +02:00
Lidiane Taquehara 7ef0cebea8 Refactor params parser specs (#723)
Use named subjects for methods, avoiding calling for parser in
each expectation.
2018-11-05 11:07:25 +01:00
Lidiane Taquehara a5f5fee058 Refactor data type specs 2018-10-31 17:49:03 -03:00
Daniel Doubrovkine (dB.) @dblockdotorg 224c5f2694 Upgraded and locked Rubocop at 0.60.0. (#719) 2018-10-29 16:32:45 +01:00
Brian Weiner da351d0f99 Option to add brace to array params (#695)
* Add an option to add braces to array params

* Add changelog entry

* Prevent false detections of array params

* Extract params parser in separate class

* resolved some failing tests due to separated param parsing class, corrected rubocop warning, added documentation
2018-08-21 13:28:33 +02:00
Josh Murphy f7376f7843 Fix is_array check for non-contiguous sub and parent entities (#691) 2018-08-02 08:41:42 +02:00
Josh Murphy baa86144f4 Deep merge params for definition and add specs (#688) 2018-07-24 11:20:05 +02:00
Josh Murphy 1c1b7eaf09 Fix array of entities with nested entities (#683)
* Update prepare_nested_types to allow for references and update specs

* Add CHANGELOG entry

* Fix lint
2018-07-19 17:28:25 +02:00
peter scholz d6bed95233
makes rubocop 0.52 happy (#658) 2017-12-13 09:21:09 +01:00
Timothy Su e6a80659b9 Fix Proc with arity one in param values (#613) 2017-06-12 22:34:06 +02:00
Tim Perkins 3493e3ca4a Allow body parameter name to be specified (#607) 2017-05-05 15:43:15 +02:00
Mitsutaka Mimura 46dffa3d28 use latest ruby version in CI (#600)
* use latest ruby version in CI

* correct rubocop

* update rubocop version
2017-04-06 21:26:40 +02:00
peter scholz 1ede5c4f7f prepare 0.27.0 (#598)
- updates dependencies
- makes rubocop 0.48 happy
2017-03-28 11:15:33 +02:00
peter scholz 2df7dbeaf1 issue #590: fixes rubocop offences (#595) 2017-03-08 09:32:31 +01:00
peter scholz 26e6d93c76 issue #584: do not mutate route.path (#585)
- adds changelog entry
2017-02-27 21:59:31 +01:00
peter scholz ab12328257 increases code coverage (#570)
- removbes dead code
- adds changelog entry
- corrects coveralls bagde
2017-01-15 23:54:02 +01:00
Frédéric Rodrigo 385b68f5a8 Use entity_name event if type come from a string (#547)
* Use entity_name event if type come from a string

* Fix CHANGELOG.md format

* Make rubocup happy
2016-12-08 16:14:37 +01:00
peter scholz ef1d5cdf76 adds specs for rake tasks (#502)
- make it <0.16.0 compatible
- adds changelog entry
- [scouting] removes non existend examples contexts
2016-09-10 14:35:01 +02:00
Frédéric Rodrigo 43674b762f Fix regex for Array and Multi Type in doc_methods (#479) 2016-07-26 10:32:17 +02:00
peter scholz b5f4d1fcd1 Fixes required property for request definitions (#472)
- adds changelog entry
2016-07-10 14:52:00 -04:00
peter scholz 05c52d3f94 request definitions now inline (#468) (#470) 2016-07-07 11:44:07 -04:00
peter scholz 27ff9f4a57 refoctors building definitions for body params (#467)
- adds base spec
- adds changelog entry
2016-07-06 10:25:57 +02:00
peter scholz 756feb5f70 fixes body array params (#464)
- adds chengelog entry
2016-07-04 17:42:28 +02:00
TySpring a07385f014 Allow passing of Array with brackets (eg. Array[String], Array[Integer]) (#455) 2016-06-16 07:35:29 -04:00
Andrew Schuster 611572f3cb Include documented Hashes (#454)
* Fix logic for mapping Hash and Array objects to refs

* Add tests to account for documented Hashes and Arrays

* Do not include readOnly params in request definitions

* Test for new documentation behavior

* Update changelog [ci skip]

* Use respond_to? instead of try for earlier compliance

* Use proper url for changelog
2016-06-14 08:12:46 -04:00
scauglog 6ef800cd7c multi type and documentation hash (#444)
* multi type parameter default to first type
when :type and :default are provided in a documenation hash they override grape :type and :default

* rubocop style

* changelog style

* test multi type only if grape >= 0.14

* rubocop style

* test for muli type with grape<0.14
2016-06-10 01:38:00 +02:00
Aurel Branzeanu e9adc92e32 Fixed find_definitions_and_params to not add :description to definiti… (#450)
* Fixed find_definitions_and_params to not add :description to definitions if :description is mising on path.
Spec of move_params updated.

* [skip ci] Changelog entry added.
2016-06-07 23:20:21 +02:00
Ben Radler e47c679ce1 Update documentation with example of base_path proc (#442) 2016-05-31 14:12:22 -04:00
Daniel Doubrovkine (dB.) @dblockdotorg a162e7c75d Merge pull request #438 from texpert/version_from_route_options
options[:version] missing, changed to route.version.
2016-05-30 09:26:18 -04:00
texpert 7c5cf81b00 Passing only route parameter to PathString (the specs changed accordingly). 2016-05-30 12:03:43 +03:00
texpert 5807bb3e36 Fixed PathString.build arguments and its specs. 2016-05-29 01:29:31 +03:00
LeFnord 6fa6c111fa
adds handling of `proc`s for optional object
updates readme and changelog
2016-05-28 13:00:53 +02:00