Implement extensible architecture for Azure API Discovery#116
Open
JaninduRSD wants to merge 13 commits intowso2-extensions:azure-api-discoveryfrom
Open
Implement extensible architecture for Azure API Discovery#116JaninduRSD wants to merge 13 commits intowso2-extensions:azure-api-discoveryfrom
JaninduRSD wants to merge 13 commits intowso2-extensions:azure-api-discoveryfrom
Conversation
create separate method websocketAPIToAPI for websocket APIs context without version remove println
Tharsanan1
reviewed
Feb 12, 2026
| @@ -0,0 +1,110 @@ | |||
| /* | |||
| * Copyright (c) 2025 WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | |||
Contributor
There was a problem hiding this comment.
Since we adding this file now this should be 2026 instead of 2025. fix this in other newly added files as well
Tharsanan1
reviewed
Feb 12, 2026
Comment on lines
65
to
68
| api.setType("WS"); | ||
|
|
||
| // Set WebSocket transports | ||
| api.setTransports("ws,wss"); |
Contributor
There was a problem hiding this comment.
Instead of using magic strings, introduce constants. EX
// Better: Using Constants or Enums for type safety
api.setType(ApiType.WEBSOCKET);
// Better: Using a dedicated constant for transport protocols
api.setTransports(Protocol.WS_ALL);
Tharsanan1
reviewed
Feb 12, 2026
| api.setTransports("ws,wss"); | ||
|
|
||
| // Generate synthetic AsyncAPI definition for WebSocket | ||
| String protocol = data.protocols().contains(Protocol.WSS) ? "wss" : "ws"; |
Tharsanan1
reviewed
Feb 12, 2026
| // Set WebSocket endpoint URL if available | ||
| if (data.serviceUrl() != null) { | ||
| api.setEndpointConfig(AzureAPIUtil.buildEndpointConfigJson( | ||
| data.serviceUrl(), data.serviceUrl(), false, "ws")); |
Tharsanan1
reviewed
Feb 12, 2026
| api.setEndpointConfig(AzureAPIUtil.buildEndpointConfigJson( | ||
| data.serviceUrl(), data.serviceUrl(), false, "ws")); | ||
| } | ||
| api.setAvailableTiers(new HashSet<>(java.util.Collections.singleton(new Tier("Unlimited")))); |
Tharsanan1
reviewed
Feb 12, 2026
| ? endpointConfigJson.getAsJsonObject("production_endpoints") | ||
| : null; | ||
| String productionEndpoint = (prodEndpoints != null | ||
| && prodEndpoints.has("url") |
Contributor
There was a problem hiding this comment.
Use constants here and all the places where applicable
Tharsanan1
reviewed
Feb 12, 2026
| api.setAvailableTiers(new HashSet<>(java.util.Collections.singleton(new Tier("Unlimited")))); | ||
| return api; | ||
| } | ||
| // public static API restAPItoAPI(ApiContract apiContract, String apiDefinition, String organization, |
Contributor
There was a problem hiding this comment.
If we dont need this please remove
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning