Skip to content

Commit bbc4f4b

Browse files
Fix partial reset
1 parent a1ee41b commit bbc4f4b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/containers/OperationContainer.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { PureComponent } from "react"
22
import PropTypes from "prop-types"
33
import ImPropTypes from "react-immutable-proptypes"
44
import { opId } from "swagger-client/es/helpers"
5-
import { Iterable, fromJS, Map, OrderedMap } from "immutable"
5+
import { Iterable, fromJS, Map } from "immutable"
66

77
export default class OperationContainer extends PureComponent {
88
constructor(props, context) {
@@ -124,7 +124,7 @@ export default class OperationContainer extends PureComponent {
124124

125125
onResetClick = (pathMethod) => {
126126
const defaultRequestBodyValue = this.props.oas3Selectors.selectDefaultRequestBodyValue(...pathMethod)
127-
this.props.oas3Actions.setRequestBodyValue({ value: OrderedMap(JSON.parse(defaultRequestBodyValue)), pathMethod })
127+
this.props.oas3Actions.setRequestBodyValue({ value: fromJS(JSON.parse(defaultRequestBodyValue)), pathMethod })
128128
}
129129

130130
onExecute = () => {

src/core/plugins/json-schema-5-samples/fn/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export const sampleFromSchemaGeneric = (schema, config={}, exampleOverride = und
283283
}
284284

285285
const canAddProperty = (propName) => {
286-
if(!schema || schema.maxProperties === null || schema.maxProperties === undefined) {
286+
if(!respectXML || !schema || schema.maxProperties === null || schema.maxProperties === undefined) {
287287
return true
288288
}
289289
if(hasExceededMaxProperties()) {

0 commit comments

Comments
 (0)