fix: streamline management of user-selected produces and consumes values (#4137)
* Remove produces/consumes setter from OperationContainer * Store consumes/produces information in `meta` key * Migrate produces value state usage to `meta` key * use meta consumes data for isXml check * Fix failing tests * normalize action name casing * restore correct produces fallback value logic
This commit is contained in:
@@ -19,7 +19,7 @@ export const LOG_REQUEST = "spec_log_request"
|
||||
export const CLEAR_RESPONSE = "spec_clear_response"
|
||||
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"
|
||||
export const UPDATE_RESOLVED = "spec_update_resolved"
|
||||
export const SET_SCHEME = "set_scheme"
|
||||
|
||||
@@ -150,14 +150,14 @@ export function clearValidateParams( payload ){
|
||||
|
||||
export function changeConsumesValue(path, value) {
|
||||
return {
|
||||
type: UPDATE_OPERATION_VALUE,
|
||||
type: UPDATE_OPERATION_META_VALUE,
|
||||
payload:{ path, value, key: "consumes_value" }
|
||||
}
|
||||
}
|
||||
|
||||
export function changeProducesValue(path, value) {
|
||||
return {
|
||||
type: UPDATE_OPERATION_VALUE,
|
||||
type: UPDATE_OPERATION_META_VALUE,
|
||||
payload:{ path, value, key: "produces_value" }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user