Package v1.sulphurapi.handlers.endpoints
Class EndpointsHandler
java.lang.Object
v1.sulphurapi.handlers.endpoints.EndpointsHandler
- All Implemented Interfaces:
GUIActionInterface
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a submenu for the current loaded path with options for each HTTP method (GET, POST, PUT, DELETE, PATCH, OPTIONS).void
fillPropertiesMapFromOperation
(io.swagger.v3.oas.models.Operation item) fills propertyMap in the format :{"application/json" : {Schema object}, "application/x-www-form-urlencoded" : {Schema object}}
getGrid()
getMenu()
Returns the URL of the selected endpoint by combining the server URL and the current loaded path.Returns the selected media type from the combo box in the grid.void
setCurrentLoadedPath
(String currentLoadedPath) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface v1.sulphurapi.interfaces.GUIActionInterface
runAsyncAction, runAsyncLightAction
-
Constructor Details
-
EndpointsHandler
-
-
Method Details
-
getSelectedEndpointURL
Returns the URL of the selected endpoint by combining the server URL and the current loaded path.- Returns:
- the full URL of the selected endpoint. TODO: Handle multiple servers.
-
createSubMenu
Creates a submenu for the current loaded path with options for each HTTP method (GET, POST, PUT, DELETE, PATCH, OPTIONS).- Returns:
- the created JMenu instance containing the options for the current loaded path.
-
fillPropertiesMapFromOperation
public void fillPropertiesMapFromOperation(io.swagger.v3.oas.models.Operation item) fills propertyMap in the format :{"application/json" : {Schema object}, "application/x-www-form-urlencoded" : {Schema object}}
- Parameters:
item
- the Operation object that contains the request body content to be filled into the map.
-
getSelectedMediaType
Returns the selected media type from the combo box in the grid. If no item is selected, it returns an empty string.- Returns:
- the selected media type as a string.
-
getParametersMap
-
getPropertiesMap
-
getGrid
-
getMenu
-
getCurrentLoadedPath
-
setCurrentLoadedPath
-