Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Examples for OpenAPI 3 Parameters, Request Bodies, and Responses #5427

Merged
merged 78 commits into from
Jun 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
8e030a0
add opt-in Prettier config
shockey Jun 17, 2019
b0725d1
remove legacy `examples` implementation
shockey Jun 17, 2019
3e52c40
create ExamplesSelect
shockey Jun 18, 2019
3cacbeb
support `Response.examples` in OpenAPI 3
shockey Jun 18, 2019
540e0de
create response controls group
shockey Jun 18, 2019
258cc86
prettier reformat
shockey Jun 18, 2019
de535ca
prepare to break up Parameters
shockey Jun 18, 2019
7875473
reunify Parameters and OAS3 Parameters
shockey Jun 18, 2019
6153a65
Parameter Examples
shockey Jun 18, 2019
696afca
Example component
shockey Jun 18, 2019
1eba4aa
handle parameter value stringification correctly
shockey Jun 18, 2019
80848c9
FOR REVIEW: add prop for controlling Select
shockey Jun 18, 2019
7fa5832
use regular header for param examples in Try-It-Out
shockey Jun 18, 2019
4f7d7ec
manage active examples member via Redux
shockey Jun 19, 2019
6c0e528
Request Body Try-It-Out examples
shockey Jun 19, 2019
fa1cb20
remove special Response description styling
shockey Jun 19, 2019
be1b798
omit Example value display in Try-It-Out
shockey Jun 19, 2019
bd6c61d
support disabled text inputs in JsonSchemaForm
shockey Jun 25, 2019
799270f
Example.omitValue => Example.showValue
shockey Jun 25, 2019
23930be
ExamplesSelectValueRetainer
shockey Jun 25, 2019
daf7b0f
styling for disabled inputs
shockey Jun 25, 2019
7798b23
remove console.log
shockey Jun 25, 2019
b176291
support "Modified Values" in ExamplesSelect
shockey Jun 25, 2019
9f4a396
remove Examples component
shockey Jun 25, 2019
704f736
use ParameterRow.getParamKey for active examples member keying
shockey Jun 25, 2019
b09d2bd
split-rendering of examples in ParameterRow
shockey Jun 25, 2019
4c531c5
send disabled prop to JsonSchemaForm
shockey Jun 25, 2019
ff01b2a
use content type to key request body active examples members
shockey Jun 25, 2019
da45305
remove debugger
shockey Jun 25, 2019
f6bd312
rewire RequestBodyEditor to be a controlled component
shockey Jun 25, 2019
403215c
trigger synthetic onSelect events in ExamplesSelect
shockey Jun 25, 2019
ee1d9f4
prettier updates
shockey Jun 25, 2019
ca238d1
remove outdated Examples usage in RequestBody
shockey Jun 25, 2019
c913da1
don't handle examples changes in ESVR
shockey Jun 25, 2019
6eec50b
make RequestBodyEditor semi-controlled
shockey Jun 25, 2019
ab18c56
don't default to an empty Map for request bodies
shockey Jun 25, 2019
81cbab5
add namespaceKey to ESVR for state mgmt
shockey Jun 25, 2019
4102e79
don't key RequestBody activeExampleKeys on media type
shockey Jun 25, 2019
bf0805f
tweak ESVR isModifiedValueSelected calculation
shockey Jun 25, 2019
445ddc3
add trace class to ExamplesSelect
shockey Jun 25, 2019
9f12e30
remove usage of ESVR.currentNamespace
shockey Jun 25, 2019
8397376
reset to first example if currentExampleKey is invalid
shockey Jun 25, 2019
9229ad3
add default values to RequestBody rendering
shockey Jun 25, 2019
d3a412b
stringify things in ESVR
shockey Jun 26, 2019
47ae7e6
avoid null select value (silences React warning)
shockey Jun 26, 2019
27ec68f
detect user inputs that match any examples member's value
shockey Jun 26, 2019
67e22e4
add trace class for json-schema-array
shockey Jun 26, 2019
536dedd
shallowly convert namespace state, to preserve Immutable stucts in state
shockey Jun 26, 2019
390758b
stringify RBE values; don't trim JSON in editor
shockey Jun 26, 2019
411b6b0
match user input to an example when non-primitives are expressed in s…
shockey Jun 26, 2019
3a44f32
update Cypress
shockey Jun 27, 2019
5fc9fdb
don't apply sample values in JsonSchema_Object
shockey Jun 27, 2019
75fb5dc
support disabling all JsonSchemaForm subcomponents
shockey Jun 27, 2019
b4af897
Core tests
shockey Jun 27, 2019
0c9f947
style changes to accomodate Examples
shockey Jun 27, 2019
0af602f
fix version-checking error in Response
shockey Jun 27, 2019
e921e40
disable SCU for Responses
shockey Jun 27, 2019
28c1c7e
don't stringify Select values
shockey Jun 27, 2019
3e88c33
ModelExample: default to Model tab if no example is available; provid…
shockey Jun 27, 2019
b54e6f2
don't trim JSON ParamBody inputs
shockey Jun 28, 2019
0c3a90a
read directly from 2.0 Response.schema instead of inferring a value
shockey Jun 28, 2019
5a88cc0
show current Example information in RequestBody
shockey Jun 28, 2019
62d906e
show label for Examples dropdown by default
shockey Jun 28, 2019
6245271
rework Response content ordering
shockey Jun 29, 2019
6a0e3a8
style disabled textareas like other read-only blocks
shockey Jun 29, 2019
357a11a
meta: fix sourcemaps
shockey Jun 29, 2019
cc74df2
refactor ESVR setNameForNamespace
shockey Jun 29, 2019
bc3ed6b
protect second half of ternary expession
shockey Jun 29, 2019
0181ce0
cypress: `select.examples-select` => `.examples-select > select`
shockey Jun 29, 2019
671f2aa
clarify ModelExample.componentWillReceiveProps
shockey Jun 29, 2019
7d8a1e1
add gates/defaults to prevent issues in very bare-boned documents
shockey Jun 29, 2019
d2b1766
fix test block organization problem
shockey Jun 29, 2019
a83ca18
simplify RequestBodyEditor interface
shockey Jun 29, 2019
42f03c5
linter fixes
shockey Jun 29, 2019
3862ff7
prettier updates
shockey Jun 29, 2019
72757aa
Merge branch 'master' of github.com:swagger-api/swagger-ui into feat/…
shockey Jun 29, 2019
7b904be
use plugin system for new components
shockey Jun 29, 2019
1432e6a
move ME Cypress helpers to other file
shockey Jun 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
semi: false
trailingComma: es5
endOfLine: lf
requirePragma: true
insertPragma: true
shockey marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 5 additions & 1 deletion make-webpack-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ module.exports = function(rules, options) {
}
},

devtool: specialOptions.sourcemaps ? "nosource-source-map" : false,
devtool: specialOptions.sourcemaps ? (
// If we're mangling, size is a concern -- so use trace-only sourcemaps
// Otherwise, provide heavy souremaps suitable for development
specialOptions.minimize ? "nosource-source-map" : "cheap-module-source-map"
): false,

plugins,

Expand Down
Loading