Skip to content

Commit

Permalink
Merge pull request #628 from dulithsenanayake/fix-prototype-endpoint-…
Browse files Browse the repository at this point in the history
…issue

[Master] Add additional lifeCycleStatus check for prototype APIs
  • Loading branch information
dulithsenanayake committed Mar 26, 2024
2 parents 70a2a7c + 10f917e commit 9553771
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export default function APISecurity(props) {
} else {
isEndpointAvailable = apiContext.api.endpointConfig !== null;
isPrototyped = apiContext.api.endpointConfig !== null
&& apiContext.api.endpointConfig.implementation_status === 'prototyped';
&& apiContext.api.endpointConfig.implementation_status === 'prototyped'
&& apiContext.api.lifeCycleStatus === 'PROTOTYPED';
}

const haveMultiLevelSecurity = securityScheme.includes(API_SECURITY_MUTUAL_SSL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function Endpoints(props) {
const { api } = props;

const isPrototypedAvailable = api.endpointConfig !== null
&& api.endpointConfig.implementation_status === 'prototyped';
&& api.endpointConfig.implementation_status === 'prototyped' && api.lifeCycleStatus === 'PROTOTYPED';

/**
* Check whether the endpoint configuration is dynamic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ function EndpointOverview(props) {
} else if (apiObject.endpointImplementationType === 'MOCKED_OAS') {
return endpointTypes[7];
} else if (apiObject.endpointImplementationType === 'ENDPOINT'
&& apiObject.endpointConfig.implementation_status === 'prototyped') {
&& apiObject.endpointConfig.implementation_status === 'prototyped'
&& api.lifeCycleStatus === 'PROTOTYPED') {
return endpointTypes[3];
} else if (type === 'http') {
if (typeChangeConfirmation.serviceInfo) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ function Endpoints(props) {
}
} else {
let isValidEndpoint = false;
if (endpointConfig.implementation_status === 'prototyped') {
if (endpointConfig.implementation_status === 'prototyped' && api.lifeCycleStatus === 'PROTOTYPED') {
if (implementationType === 'ENDPOINT') {
if (endpointConfig.production_endpoints && endpointConfig.production_endpoints.url === '') {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function CheckboxLabels(props) {
isMandatoryPropertiesAvailable, isMandatoryPropertiesConfigured
} = props;
const isEndpointAvailable = !isAPIProduct
? api.endpointConfig !== null && !api.endpointConfig.implementation_status
? api.endpointConfig !== null
: false;
const lcState = isAPIProduct ? api.state : api.lifeCycleStatus;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ const showEndpoint = (api, type) => {
function Endpoints(props) {
const { parentClasses, api } = props;
const isPrototypedAvailable = api.endpointConfig !== null
&& api.endpointConfig.implementation_status === 'prototyped';
&& api.endpointConfig.implementation_status === 'prototyped'
&& api.lifeCycleStatus === 'PROTOTYPED';
const productionEndpointSecurity = api.endpointConfig && api.endpointConfig.endpoint_security
&& api.endpointConfig.endpoint_security.production.type;
const sandboxEndpointSecurity = api.endpointConfig && api.endpointConfig.endpoint_security
Expand Down

0 comments on commit 9553771

Please sign in to comment.