Class OpenAPIBuilder


  • public class OpenAPIBuilder
    extends Object
    • Constructor Detail

      • OpenAPIBuilder

        public OpenAPIBuilder()
    • Method Detail

      • createBuilder

        public static OpenAPIBuilder createBuilder​(String name,
                                                   String topElementName,
                                                   String prefix)
        In most cases, configName and topElementName can be the same. It just gives you the flexibility. If you only want to make a nested object use createBuilder() More details of usage please refer to OpenAPIBuilderTest.class
        Parameters:
        name -
        topElementName -
        prefix -
        Returns:
        See Also:
        createBuilder(), org.opennms.features.config.dao.util.OpenAPIBuilderTest
      • createBuilder

        public static OpenAPIBuilder createBuilder​(String name,
                                                   String topElementName,
                                                   String prefix,
                                                   io.swagger.v3.oas.models.OpenAPI openapi)
        This is use for modify existing OpenAPI object
        Parameters:
        name -
        topElementName -
        prefix -
        openapi - (existing)
        Returns:
      • getRootConfig

        public ConfigItem getRootConfig()
      • build

        public io.swagger.v3.oas.models.OpenAPI build​(boolean isSingleConfig)
        build OpenAPI, if isSingleConfig is false. It will only generate API path for get and update config. (default) NO add / delete config and list configIds
        Parameters:
        isSingleConfig -
        Returns:
      • removeAttribute

        public OpenAPIBuilder removeAttribute​(String attributeName)
        It will directly remove the first level attribute only
        Parameters:
        attributeName -
        Returns: