Commit Graph

357 Commits

Author SHA1 Message Date
kyle
ff496fa5bd fix: type safety for operation summary handling (via #5191)
* fix: gracefully handle non-string operation summaries

* use lodash for more summary type safety
2019-02-23 17:00:29 -08:00
kyle
1e184e8e21 fix: sanitize URLs used for OAuth auth flow (via #5190)
* fix: sanitize URLs used for OAuth auth flow

* embetter test case

* fix linter issue
2019-02-23 14:14:30 -08:00
kyle
d9f460f4a8 fix: gracefully handle non-string operation summaries (via #5189) 2019-02-19 15:41:16 -08:00
kyle
291e2c7251 improvement: operation path + summary overflow styling (via #5184)
* improvement: operation path + summary overflow styling

* inject zero-width spaces for better path breaking

* migrate 4867 regression test to tolerate new ZWSPs

* rm `dev-helpers/doc.yaml`
2019-02-15 20:05:26 -06:00
kyle
373da3bee3 fix: provide JSON editor for x-www-form-urlencoded bodies lacking properties (via #5180) 2019-02-13 18:47:01 -06:00
kyle
d3c2e2777f fix: coerce multipart initial property values to string (via #5166)
* coerce multipart initial property values to string

* add tests
2019-02-07 15:35:22 -06:00
kyle
15cdfe14dd improvement: generate non-smart Markdown quotes (via #5162) 2019-02-06 21:48:52 -06:00
kyle
0047ce96a8 fix: don't trigger url remote document load if urls is provided (via #5161)
* fix: don't trigger `url` remote document load if `urls` is provided

* better test block title
2019-02-06 19:32:35 -06:00
kyle
b716ed2515 fix: gracefully handle malformed global tags array in taggedOperations selector (via #5159)
* fix: handle malformed global tags array in taggedOperations

* handle non-array global tags as well

* update test imports

* remove stray brackets
2019-02-05 20:10:18 -06:00
kyle
abf34961e9 bug: parameter allowEmptyValue + required interactions (via #5142)
* 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
2019-01-29 16:46:03 -06:00
kyle
315819b2c9 fix: non-typesafe spec selector (via #5121)
* add failing tests

* fix things
2019-01-12 00:58:20 -06:00
kyle
1e8e0dba30 fix: tag-level deep link escaping inconsistencies (via #5117)
* add test cases

* update tag deeplinking implementation

* MOAR test updates

* update operation-tag.jsx
2019-01-10 15:58:37 -06:00
kyle
655ef9e662 fix: urls.primaryName functionality regression (via #5097)
* add tests

* compute index before triggering URL load

* bonus: improve urls topbar label
2018-12-21 23:51:58 -06:00
kyle
69b362aded housekeeping: change test name + comment (via #5091) 2018-12-19 20:52:28 +01:00
kyle
61b5ed79a0 improvement: generate default oauth2RedirectUrl based on page location (via #5085) 2018-12-14 19:54:53 -07:00
kyle
f5e179ac39 improvement: add Schema/Model switching to ModelExample component (via #5080) 2018-12-13 21:28:01 +01:00
kyle
a5568f9e16 improve: OAuth2 UI and test suite (via #5066)
* create `features` folder

* add base oauth2 server

* continue implementing OAuth tests

* WIP

* add password flow tests

* modify Password flow credential types

* remove query string credential type

* add test case for Authorization flow

* add specific Authorization value for Password flow test

* WIP

* fix linter issues
2018-12-07 20:54:29 +01:00
kyle
91b1becc65 fix: label models section as Schemas in OpenAPI 3 (via #5065)
* fix: label models section `Schemas` in OpenAPI 3

* Update swos-63.js
2018-12-07 20:29:35 +01:00
kyle
2669b26dcb housekeeping: update model wrapper selector in Selenium tests (via #5064) 2018-12-07 16:01:50 +01:00
Kristofer Wright
a40edea3f1 fix: only append type flag to curl if type is defined (via #5041)
* issue 5040: only append type to formData file if defined

* errant whitespace removal:

* conform to code style

* code style

* use template string in nested type ternary operator
2018-11-24 00:22:42 +01:00
kyle
971c6f7536 fix: path-item $ref produces/consumes inheritance (via #5049)
* implement a selector for consumes options

* fix incorrect comment, test names

* add `consumesOptionsFor` selector

* use `consumesOptionsFor` and drop `operationConsumes`
2018-11-23 23:24:11 +01:00
kyle
074eaa5d51 fix: prevent object inheritance mutations in recursive sampleXmlFromSchema calls (via #5034)
* fix: prevent object inheritance mutations in recursive sampleXmlFromSchema calls

* fix unrelated test
2018-11-16 21:02:23 +01:00
Helen Kosova
89868a85bb feat: sample value generation for uuid, hostname, ipv4, & ipv6 formats (via #5033) 2018-11-16 13:22:42 +01:00
Jeremy Hayes
078bca3566 feat: sample value generation for date formats (via #5024) 2018-11-16 00:49:23 +01:00
kyle
ad786b023f housekeeping: .js -> .jsx file extensions (via #5014)
* housekeeping: `.js` -> `.jsx` where necessary
2018-11-08 16:37:21 +00:00
kyle
02758b8125 bugfix: legacy Docker variables being overridden by default values (via #5006)
* add `onFound` callback to schemas

* add warning to method docs (for #4957)

* implement Docker OAuth2 init block support

* update docs

* add OAUTH_SCOPE_SEPARATOR

* drop OAuth env from Dockerfile and run script

* don't indent the first oauth block line

* drop unused `dedent` import

* touch up warning message

* add more test cases

* return an empty block if no OAuth content is generated

* fix broken doc line

* allow legacy values to override base values
2018-11-06 01:57:20 +00:00
kyle
c6eb8edb5f feature: Docker OAuth block support (via #4987)
* add `onFound` callback to schemas
* add warning to method docs (for #4957)
* implement Docker OAuth2 init block support
* update docs
* add OAUTH_SCOPE_SEPARATOR
* drop OAuth env from Dockerfile and run script
* don't indent the first oauth block line
* drop unused `dedent` import
* touch up warning message
* add more test cases
* return an empty block if no OAuth content is generated
* fix broken doc line
2018-11-01 18:52:13 -04:00
kyle
31a8b13777 feature: full-spectrum runtime Docker configuration (via #4965)
* reorganize docker things

* Configurator WIP

* implement Docker runtime config generator

* add tests

* update documentation

* fix Markdown tables

* Move Docker section

* add note to README

* move up `nodejs` install for more aggressive caching

* drop exclusive test

* fix missing `DISPLAY_OPERATION_ID`
2018-11-01 14:53:29 -04:00
kyle
3df9fad68a improve: deeplinking behavior (#4960)
* add passing tests for fragment rewriting

* add failing fragment retention tests

* fire legacy `show` actions before standard ones

* skip failing tests

* remove extra line
2018-10-19 17:33:30 -05:00
Andrey Torsunov
505d056c71 improve: add support of RFC5987 Content-Disposition formats (via #4952)
* Add support of RFC5987 for Content-Disposition

For example, `attachement; filename*=UTF-8'ru'%D1%81%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F.xlsx` in result will be  `сведения.xlsx`.

* Test of support of RFC5987 in Content-Disposition
2018-10-19 11:42:37 -05:00
kyle
9a4dd00803 housekeeping: deduplicate deep linking test cases (via #4958)
* deduplicate deep linking test cases

* clean up tests and base cases
2018-10-18 18:52:39 -05:00
James ZHANG
1791759de5 improve(deeplink): support utf16 tags and IDs (via #4921)
* ref #3958, support utf16 fragments on the deeplink plugin
* put -> head for UTF16 operation
this is a temporary fix, eventually we will run out
of methods and need to use a new targeting strategy
* drop obsolete %20 decoder
* add full test suite for UTF16 operation
* use encodeURIComponent when setting hash
* drop obsolete test cases
2018-10-18 16:55:30 -05:00
kyle
3c3b7e0bf1 bug(deeplinking): escaping breaks whitespaces & underscored tags/ids (via #4953)
* add tests for operation lacking an operationId
* add deep linking tests for tags/operationIds with underscores
* migrate from `_` to `%20` for deeplink hash whitespace escaping
* add backwards compatibility for `_` whitespace escaping
* update util unit tests
2018-10-16 18:51:29 -05:00
kyle
ecfc23972a fix: inconsistent behavior with multiple invocations of SwaggerUI (via #4923)
* add narrow e2e tests
* add failing system unit test
* break plugin object inheritance in combinePlugins
* style: add braces to if block
* drop unused `lodash.repeat` import
* remove deep-freeze from lockfile
2018-10-04 18:00:38 -05:00
kyle
004f107ec4 fix: repair schemes servers rendering (via #4913)
* create AuthorizeBtnContainer

* remove Servers and AuthorizeBtn from Schemes' concern

* add AuthorizeBtnContainer to base

* strengthen OAS3 definitionsToAuthorize

* drop obsolete tests

* linter fixes
2018-10-01 20:27:52 -05:00
k.bigwheel
13341658f9 housekeeping: test fixture file path mistake (via #4862) 2018-09-14 22:23:25 -07:00
kyle
8fb0cfd2bb fix: tolerate callback parameter values in ParameterRow (via #4873)
* fix: tolerate callback parameter values in ParameterRow
* Update 4867.js
2018-09-12 20:56:23 -07:00
kyle
54276c95e2 fix: gracefully handle empty request bodies (via #4859) 2018-09-07 16:18:13 -07:00
kyle
eb6c43405f fix: resolved model data invalidation (via #4858) 2018-09-07 14:13:43 -07:00
kyle
e6b7167dd8 fix(deeplinking): expand containing tag when expanding an operation (#4837)
* fix(deeplinking): expand containing tag when expanding an operation
* linter fixes
* tighten up test cases
2018-08-27 22:58:00 -07:00
kyle
f51f391dcc release: v3.18.2 (#4834)
* v3.18.2

* rebuild dist

* update e2e test path config
2018-08-25 12:13:00 -07:00
kyle
00432fc07c fix: deep link fragment escaping (via #4832)
* `test/e2e` -> `test/e2e-selenium`

* add Cypress

* ESLint fixes

* MOAR cypress

* `integration` -> `tests`

* wire Cypress up to a hot e2e server

* add failing tests for #4537

* add petstore for future use

* don't tack `operations/` onto href path

* escape generated URL fragments

* Update package.json
2018-08-23 15:24:32 -07:00
kyle
b4f1886306 meta: supplemental tests for #4537 (via #4828)
* `test/e2e` -> `test/e2e-selenium`

* add Cypress

* ESLint fixes

* MOAR cypress

* `integration` -> `tests`

* wire Cypress up to a hot e2e server

* add failing tests for #4537

* Update package.json
2018-08-23 15:18:13 -07:00
kyle
1b2fbda646 meta: introduce Cypress end-to-end testing (via #4827)
* `test/e2e` -> `test/e2e-selenium`

* add Cypress

* ESLint fixes

* MOAR cypress

* `integration` -> `tests`

* wire Cypress up to a hot e2e server

* linter fixes

* don't run in CI
2018-08-23 15:10:00 -07:00
Yann Savary
12e350fcad fix: incorrect usage of lodash.lowerCase (via #4200)
* Wrong usage of https://lodash.com/docs/4.17.5#lowerCase

* Add basic tests about ResponseBody Content-Type
2018-08-22 15:15:12 -07:00
Tim Macfarlane
9a9cfdf101 improvement: omit deprecated fields in examples (via #4758) 2018-08-20 14:11:50 -07:00
kyle
87296702c6 feature: allowEmptyValue controls (#4788)
* add baseline tests

* coerce empty strings to null when updating parameter values

* add ParameterIncludeEmpty

* add redux management for empty parameter value inclusion state

* use name+in keying for state management instead of hash keying

* update new redux method usages to name+in keying

* coerce empty Immutable iterables in onChangeWrapper

* OAS3 tests & support

* add included empty parameters to requests before dispatching to Swagger Client

* make empty inclusion interface prettier

* add tests for #4587

* linter fixes

* check for truthy value before reaching into property
2018-08-04 01:26:07 -07:00
kyle
dd3afdc456 fix: anchor tag safety (via #4789)
* v3.17.6

* release(3.17.6): rebuild dist

* add failing tests

* fix Link component

* fix OnlineValidatorBadge component

* switch from <a> to <Link> in operation components

* make Markdown inputs safe

* use Link component in Info block, for target safety

* add eslint rule for unsafe `target` usage
2018-08-04 00:54:03 -07:00
kyle
955352251b fix(try-it-out): stringify numerical initial values in ParameterRow (#4767)
* add failing tests
* coerce initial values to string
* only convert numbers to strings when setting parameter values
2018-07-27 01:17:36 -07:00
kyle
0359f9c364 housekeeping: bundle size reductions (#4713)
* set new bundlesize goal
* preserve `GeneratorFunction` instead of all function names
* use js-yaml fork that doesn't require esprima
* set HTML content directly, instead of using React-Markdown
* use remarkable for all Markdown rendering
* add babel-plugin-transform-react-remove-prop-types
* remove SplitPaneMode plugin
* remove react-collapse
* remove AST plugin, and yaml-js
* trim Markdown HTML string output before rendering
* disable obsolete function name preservation
* add `getComponent` to propTypes
2018-07-19 13:48:39 -07:00