Skip to content

Conversation

@shockey
Copy link
Contributor

@shockey shockey commented Jan 19, 2018

Fixes #3998.

This is a 90% solution. The ContentType select components still transmit their default values, but the consumes/produces logic was removed from OperationContainer, so that logic only runs when it has to.

}

componentWillReceiveProps(nextProps) {
const defaultContentType = "application/json"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to be sure to preserve this default

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha

}

if (producesValue === undefined) {
producesValue = produces && produces.size ? produces.first() : defaultContentType
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preserve this logic

export const CLEAR_REQUEST = "spec_clear_request"
export const CLEAR_VALIDATE_PARAMS = "spec_clear_validate_param"
export const UPDATE_OPERATION_VALUE = "spec_update_operation_value"
export const UPDATE_OPERATION_META_VALUE = "spec_UPDATE_OPERATION_META_VALUE"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the case here

return state.setIn( [ "mutatedRequests", path, method ], fromJSOrdered(req))
},

[UPDATE_OPERATION_VALUE]: (state, { payload: { path, value, key } }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be documented as an internal API change in release notes.

@shockey shockey merged commit 7af7121 into swagger-api:master Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants