Conversation
|
|
||
| { name => value } | ||
| end | ||
| [ name, value ] |
There was a problem hiding this comment.
Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.
lib/oas_objs/param_obj.rb
Outdated
| desc = schema.processed[:description] | ||
| processed[:description] = desc if desc | ||
| processed[:description] = processed[:schema].delete(:description) if processed[:schema].key?(:description) | ||
| processed[:examples] = processed[:schema].delete(:examples) if processed[:schema].key?(:examples) |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [105/80]
lib/oas_objs/param_obj.rb
Outdated
| processed[:schema] = schema.process | ||
| desc = schema.processed[:description] | ||
| processed[:description] = desc if desc | ||
| processed[:description] = processed[:schema].delete(:description) if processed[:schema].key?(:description) |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [114/80]
| desc :example, subject: :examples do | ||
| mk -> { example :ExampleA, { }; example :ExampleZ, { } }, doc_will_has_keys: { examples: %i[ ExampleA ExampleZ ] }; clear | ||
| mk -> { example :ExampleA, { name: 'BeiGou' } }, get: { ExampleA: [{ name: { value: 'BeiGou' } }] } | ||
| mk -> { example :ExampleA, { name: 'BeiGou' } }, get: { ExampleA: { name: { value: 'BeiGou' } } } |
There was a problem hiding this comment.
Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
Metrics/LineLength: Line is too long. [101/80]
|
During generating examples for query param, I stepped on the fact, that while |
| end | ||
|
|
||
| def extract_from_schema(key) | ||
| processed[key] = processed[:schema].delete(key) if processed[:schema].key?(key) |
There was a problem hiding this comment.
Metrics/LineLength: Line is too long. [87/80]
Examples should have different location and format according to OAS 3.0.