Skip to content

Commit

Permalink
Merge pull request #517 from Kirishikesan/fix-4962
Browse files Browse the repository at this point in the history
Changes spaces to hyphens in space included urls and Sets validation errors to empty array when url is valid
  • Loading branch information
Kirishikesan authored Nov 28, 2023
2 parents ba9629d + 4daaccb commit 95fe26a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export default function ProvideOpenAPI(props) {
info.content = content;
inputsDispatcher({ action: 'preSetAPI', value: info });
setValidity({ ...isValid, url: null });
setValidationErrors([]);
} else {
setValidity({ ...isValid, url: { message: 'OpenAPI content validation failed!' } });
setValidationErrors(errors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class APISecurityAudit extends Component {
id: 'Apis.Details.APIDefinition.AuditApi.GetReportError',
defaultMessage: 'Something went wrong while retrieving the API Security Report',
}));
const redirectUrl = '/apis/' + apiId + '/api definition';
const redirectUrl = '/apis/' + apiId + '/api-definition';
history.push(redirectUrl);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function GoToDefinitionLink(props) {
const classes = useStyles();
return (
<Box m={1}>
<Link to={`/apis/${api.id}/api definition`}>
<Link to={`/apis/${api.id}/api-definition`}>
<Typography className={classes.link} variant='caption'>
{message}
<LaunchIcon style={{ marginLeft: '2px' }} fontSize='small' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default function DevelopSectionMenu(props) {
id: 'Apis.Details.index.business.info',
defaultMessage: 'business info',
})}
to={pathPrefix + 'business info'}
to={pathPrefix + 'business-info'}
Icon={<BusinessIcon />}
id='left-menu-itembusinessinfo'
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class Details extends Component {
defaultMessage: 'API definition',
})}
route='api definition'
to={pathPrefix + 'api definition'}
to={pathPrefix + 'api-definition'}
Icon={<CodeIcon />}
id='left-menu-itemAPIdefinition'
/>
Expand Down Expand Up @@ -1017,9 +1017,9 @@ Details.subPaths = {
BASE_PRODUCT: '/api-products/:apiprod_uuid',
OVERVIEW: '/apis/:api_uuid/overview',
OVERVIEW_PRODUCT: '/api-products/:apiprod_uuid/overview',
API_DEFINITION: '/apis/:api_uuid/api definition',
API_DEFINITION: '/apis/:api_uuid/api-definition',
WSDL: '/apis/:api_uuid/wsdl',
API_DEFINITION_PRODUCT: '/api-products/:apiprod_uuid/api definition',
API_DEFINITION_PRODUCT: '/api-products/:apiprod_uuid/api-definition',
SCHEMA_DEFINITION: '/apis/:api_uuid/schema definition',
LIFE_CYCLE: '/apis/:api_uuid/lifecycle',
LIFE_CYCLE_PRODUCT: '/api-products/:apiprod_uuid/lifecycle',
Expand All @@ -1042,8 +1042,8 @@ Details.subPaths = {
SUBSCRIPTIONS: '/apis/:api_uuid/subscriptions',
SECURITY: '/apis/:api_uuid/security',
COMMENTS: '/apis/:api_uuid/comments',
BUSINESS_INFO: '/apis/:api_uuid/business info',
BUSINESS_INFO_PRODUCT: '/api-products/:apiprod_uuid/business info',
BUSINESS_INFO: '/apis/:api_uuid/business-info',
BUSINESS_INFO_PRODUCT: '/api-products/:apiprod_uuid/business-info',
PROPERTIES: '/apis/:api_uuid/properties',
PROPERTIES_PRODUCT: '/api-products/:apiprod_uuid/properties',
NEW_VERSION: '/apis/:api_uuid/new_version',
Expand Down

0 comments on commit 95fe26a

Please sign in to comment.