All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sdase.commons.starter.builder.OpenApiCustomizer Maven / Gradle / Ivy

Go to download

A libraries to bootstrap services easily that follow the patterns and specifications promoted by the SDA SE

There is a newer version: 7.0.87
Show newest version
package org.sdase.commons.starter.builder;

import io.dropwizard.core.Configuration;

public interface OpenApiCustomizer {

  interface OpenApiInitialBuilder extends PlatformBundleBuilder {

    /**
     * Adds a package to the packages Swagger should scan to pick up resources.
     *
     * @param resourcePackage the package to be scanned; not null
     * @return the builder instance
     * @throws NullPointerException if resourcePackage is null
     * @throws IllegalArgumentException if resourcePackage is empty
     * @see org.sdase.commons.server.openapi.OpenApiBundle.InitialBuilder#addResourcePackage(String)
     */
    OpenApiFinalBuilder addOpenApiResourcePackage(String resourcePackage);

    /**
     * Adds the package of the given class to the packages Swagger should scan to pick up resources.
     *
     * @param resourcePackageClass the class whose package should be scanned; not null
     * @return the builder instance
     * @throws NullPointerException if resourcePackageClass is null
     * @see
     *     org.sdase.commons.server.openapi.OpenApiBundle.InitialBuilder#addResourcePackageClass(Class)
     */
    OpenApiFinalBuilder addOpenApiResourcePackageClass(Class resourcePackageClass);

    /**
     * Use an existing OpenAPI 3 specification as base for the generation.
     *
     * 

Note that the OpenAPI annotations always override values from the files if classes are * registered with {@link #addOpenApiResourcePackage(String)} or {@link * #addOpenApiResourcePackageClass(Class)}. * * @param openApiJsonOrYaml the OpenAPI 3 specification as json or yaml * @return the builder instance * @see * org.sdase.commons.server.openapi.OpenApiBundle.InitialBuilder#withExistingOpenAPI(String) */ OpenApiFinalBuilder withExistingOpenAPI(String openApiJsonOrYaml); /** * Reads an existing OpenAPI 3 specification from the given classpath resource and provide it to * {@link #withExistingOpenAPI(String)} * * @param path the path to an OpenAPI 3 YAML or JSON file in the classpath. * @return the builder instance * @see * org.sdase.commons.server.openapi.OpenApiBundle.InitialBuilder#withExistingOpenAPIFromClasspathResource(String) */ OpenApiFinalBuilder withExistingOpenAPIFromClasspathResource(String path); } interface OpenApiFinalBuilder extends PlatformBundleBuilder, OpenApiInitialBuilder {} }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy