2023-08-13 01:15:26 +01:00
package stirling.software.SPDF.config ;
import org.springframework.context.annotation.Bean ;
import org.springframework.context.annotation.Configuration ;
import io.swagger.v3.oas.models.Components ;
import io.swagger.v3.oas.models.OpenAPI ;
import io.swagger.v3.oas.models.info.Info ;
@Configuration
public class OpenApiConfig {
@Bean
public OpenAPI customOpenAPI () {
String version = getClass (). getPackage (). getImplementationVersion ();
if ( version == null ) {
2023-09-02 00:05:50 +01:00
2023-08-13 01:15:26 +01:00
version = "1.0.0" ; // default version if all else fails
2023-09-02 00:05:50 +01:00
2023-08-13 01:15:26 +01:00
}
return new OpenAPI (). components ( new Components ()). info (
new Info (). title ( "Stirling PDF API" ). version ( version ). description ( "API documentation for all Server-Side processing.\nPlease note some functionality might be UI only and missing from here." ));
}
}