* Move next to download button and match styling
Co-authored-by: Aldrin Abastillas <AAbastillas@rcanalytics.com>
Co-authored-by: Tim Lai <timothy.lai@gmail.com>
This commit changes markdown sanitization behaviour in following way:
class, style and data-* attributes are removed by default. These attributes
open possible vulnerability vectors to attackers.
The original behavior of sanitizer (before this commit) can be enabled by *useUnsafeMarkdown* configuration option.
Use this configuration option with caution and only in cases when you know
what you're doing.
* Add empty data param to cURL if no request body was given
Some middleware applications do not allow POST requests without a content-length header. By adding a empty data parameter to the curl command, the content-length header will be set by curl. Besides this it is more obvious to the user that no request body is sent.
* use double quotes like the rest of the curl command
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
* Feature: Render OAS3 parameter type formats
* Add more test cases to parameter-row
* Update test/mocha/components/parameter-row.jsx
Co-Authored-By: Helen Kosova <hkosova@users.noreply.github.com>
* Update src/core/components/parameter-row.jsx
Co-authored-by: Helen Kosova <hkosova@users.noreply.github.com>
Co-authored-by: kyle shockey <kyleshockey@gmail.com>
* 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>
* patch(#5672): code highlight styles are now only applied to pre blocks that have the class pre.microlight
* fixed pre style appied to .request-url
* fixed response-headers and request-duration pre blocks
* made pre.microlight class as per review
* added microlight class to appropriate pre and added tests
* improve(getParameterSchema): ParameterSchemaDescriptor pattern
* chore: update usage of `getParameterSchema`
* consider `Parameter.content` media type when validating JSON values
* 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
* add `security-audit` script
* npm audit fix
* remove nyc
* nightwatch@1
this breaks the test suite, but it appears to have already regressed. leaving it for another day, TODO: open a backlog ticket
* add `security-audit` script
* disable mocha exclusivity
* update package-lock.json
* cypress@3.4.0
* `npm audit fix`
* @release-it/conventional-changelog@1.1.0
* release-it@12
* 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
* Add the withCredentials configuration key
It enables passing credentials in CORS requests. e.g. Cookies and
Authorization headers.
* Improve withCredentials documentation
* Add unit tests for the withCredentials config
* Update configuration.md
* Update configuration.md
* only set `withCredentials` Fetch flag if the config value is truthy
there are some workarounds in the wild today that involve setting `withCredentials` on `system.fn.fetch` directly.
this approach avoids mangling those existing workarounds!
* add more test cases
* Update configs-wrap-actions.js
* Update index.js
* add failing tests
* standardize parameter keying
* validateParam test migrations
* migrate test cases to new pattern
* disambiguate name/in ordering in `body.body` test cases
* `name+in`=> `{in}.{name}`
* consider allowEmptyValue parameter inclusion in runtime validation
* use config object for all validateParam options
* drop isXml flag from validateParams