* When the media-type is changed, there is a new `onChangeMediaType` method to handle actions.
* If target schema properties key/value pairs does NOT equals current schema properties, clear the requestBodyValue, try-it-out request/response and validation params.
* If target schema properties key/value pairs DOES equals current schema properties, do not change or re-render schema properties
* oas3Selector `validateShallowRequired` now also validates required keys against target media-type
Fixes#6201, #6250, #6476
* json schema array component should use schema to generate example in case of array items.
* empty value checkbox should be disabled if not empty => not empty list || not empty string
* curl should also check for not empty list
* fix(OAS3): servers component should use nextProps
* test(OAS3): cypress tests for selecting multiple servers
* test(OAS3): multiple server test with definition change
fixes#5181
* application/json
* application/xml
* application/x-www-form-urlencoded
* Set requestBodyValue values to be an immutable Map, as "value". Previously stored as a normal String.
* This enables adding "errors" to the Map, for validation use
* note: getOAS3RequiredRequestBodyContentType requires state.spec,
* which is not available to state.oas3
bug: JsonSchema components should validate schema properties exists
- schema
- type
- format
- enum
bug: fix a debounce error in JsonSchema_string if value is null
ft: new simplified JsonSchemaArrayItemText component
test: use immutableJS for `json-schema-form` test
test: add dev scripts to run `cypress open`
test: new cypress `schema-form` tests
* clears authentications when logout is clicked
* tests the headers sent in the network request
* adds test for multiple api keys
* refactors tests to extract common uses
* correct test message description
Co-authored-by: kyle shockey <kyleshockey@gmail.com>
* 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
* webpack.dist-style.config.js -> webpack-dist-style.config.js
* correctly generate stylesheets in dev server
* attempt to recover from missing StandalonePlugin in Cypress runner
* add opt-in Prettier config
* remove legacy `examples` implementation
* create ExamplesSelect
* support `Response.examples` in OpenAPI 3
* create response controls group
* prettier reformat
* prepare to break up Parameters
* reunify Parameters and OAS3 Parameters
* Parameter Examples
* Example component
* handle parameter value stringification correctly
* FOR REVIEW: add prop for controlling Select
* use regular header for param examples in Try-It-Out
* manage active examples member via Redux
* Request Body Try-It-Out examples
* remove special Response description styling
* omit Example value display in Try-It-Out
* support disabled text inputs in JsonSchemaForm
* Example.omitValue => Example.showValue
* ExamplesSelectValueRetainer
* styling for disabled inputs
* remove console.log
* support "Modified Values" in ExamplesSelect
* remove Examples component
(wasn't used anywhere)
* use ParameterRow.getParamKey for active examples member keying
* split-rendering of examples in ParameterRow
* send disabled prop to JsonSchemaForm
* use content type to key request body active examples members
* remove debugger
* rewire RequestBodyEditor to be a controlled component
REVIEW: does this have perf implications?
* trigger synthetic onSelect events in ExamplesSelect
* prettier updates
* remove outdated Examples usage in RequestBody
* don't handle examples changes in ESVR
* make RequestBodyEditor semi-controlled
* don't default to an empty Map for request bodies
* add namespaceKey to ESVR for state mgmt
* don't key RequestBody activeExampleKeys on media type
* tweak ESVR isModifiedValueSelected calculation
* add trace class to ExamplesSelect
* remove usage of ESVR.currentNamespace
* reset to first example if currentExampleKey is invalid
* add default values to RequestBody rendering
* stringify things in ESVR
* avoid null select value (silences React warning)
* detect user inputs that match any examples member's value
* add trace class for json-schema-array
* shallowly convert namespace state, to preserve Immutable stucts in state
* stringify RBE values; don't trim JSON in editor
* match user input to an example when non-primitives are expressed in state as strings
* update Cypress
* don't apply sample values in JsonSchema_Object
* support disabling all JsonSchemaForm subcomponents
* Core tests
* style changes to accomodate Examples
* fix version-checking error in Response
* disable SCU for Responses
* don't stringify Select values
* ModelExample: default to Model tab if no example is available; provide a default no example message
* don't trim JSON ParamBody inputs
* read directly from 2.0 Response.schema instead of inferring a value
* show current Example information in RequestBody
* show label for Examples dropdown by default
* rework Response content ordering
* style disabled textareas like other read-only blocks
* meta: fix sourcemaps
* refactor ESVR setNameForNamespace
* protect second half of ternary expession
* cypress: `select.examples-select` => `.examples-select > select`
* clarify ModelExample.componentWillReceiveProps
* add gates/defaults to prevent issues in very bare-boned documents
* fix test block organization problem
* simplify RequestBodyEditor interface
* linter fixes
* prettier updates
* use plugin system for new components
* move ME Cypress helpers to other file