feature: support for Parameter.content (#5571)
* add `getParameterSchema` OAS helper * use `Parameter.content.[firstKey].schema` as schema value when present * `newValue` -> `initialValue` * make `paramWithMeta` a const * add trailing comma to `swagger2SchemaKeys` * refactor `helpers` to a folder * deprecate `src/core/utils.js` in favor of `src/core/helpers/` * support `Parameter.content.[mediaType].schema` in validateParam * reject `null` as an OAS3 object value * expose Fetch errors in the browser console * generate ParameterRow default values based on `content` values * add tests for `getParameterSchema` * remove debugger statement * remove debugger statement * don't apply `generatedSampleValue`s to parameters with `examples` * remove extra semi * disable JSON check in parameter runtime validation * stringify JsonSchema_object textarea values * add Cypress tests * swagger-client@3.9.4
This commit is contained in:
41
test/e2e-cypress/static/documents/bugs/4442.yaml
Normal file
41
test/e2e-cypress/static/documents/bugs/4442.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
openapi: "3.0.0"
|
||||
|
||||
|
||||
paths:
|
||||
/:
|
||||
get:
|
||||
parameters:
|
||||
- name: users
|
||||
in: query
|
||||
description: List of users to query for
|
||||
content:
|
||||
application/json:
|
||||
example:
|
||||
- userId: 1
|
||||
currency: USD
|
||||
- userId: 2
|
||||
currency: CAD
|
||||
schema:
|
||||
$ref: "#/components/schemas/UserArray"
|
||||
responses:
|
||||
200:
|
||||
description: OK!
|
||||
components:
|
||||
schemas:
|
||||
|
||||
UserArray:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/User"
|
||||
|
||||
User:
|
||||
type: object
|
||||
required:
|
||||
- userId
|
||||
- currency
|
||||
properties:
|
||||
userId:
|
||||
type: integer
|
||||
format: int32
|
||||
currency:
|
||||
type: string
|
||||
Reference in New Issue
Block a user