Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.media.ObjectSchema;
import io.swagger.v3.oas.models.media.Schema;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.api.ErrorMessage;
import org.springdoc.api.OpenApiResourceNotFoundException;
import org.springdoc.core.conditions.CacheOrGroupedOpenApiCondition;
Expand Down Expand Up @@ -101,6 +103,8 @@
import org.springdoc.core.utils.PropertyResolverUtils;
import org.springdoc.core.utils.SchemaUtils;
import org.springdoc.core.utils.SpringDocKotlinUtils;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.event.EventListener;
import reactor.core.publisher.Flux;

import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
Expand Down Expand Up @@ -152,6 +156,13 @@
@ConditionalOnWebApplication
public class SpringDocConfiguration {

protected static final Logger LOGGER = LoggerFactory.getLogger(SpringDocConfiguration.class);

@EventListener(ApplicationReadyEvent.class)
public void init() {
LOGGER.warn("SpringDoc /api-docs endpoint is enabled by default. To disable it in production, set the property '{}=false' in your production profile configuration.", SPRINGDOC_ENABLED);
}

/**
* The constant BINDRESULT_CLASS.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
package org.springdoc.webflux.scalar;

import com.scalar.maven.webjar.ScalarProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.core.configuration.SpringDocConfiguration;
import org.springdoc.core.properties.SpringDocConfigProperties;

Expand All @@ -40,10 +42,12 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.event.EventListener;
import org.springframework.web.server.adapter.ForwardedHeaderTransformer;

import static org.springdoc.core.utils.Constants.SPRINGDOC_SWAGGER_UI_ENABLED;
Expand All @@ -63,6 +67,14 @@
@ConditionalOnProperty(prefix = "scalar", name = "enabled", havingValue = "true", matchIfMissing = true)
public class ScalarConfiguration {

protected static final Logger LOGGER = LoggerFactory.getLogger(ScalarConfiguration.class);

@EventListener(ApplicationReadyEvent.class)
public void init() {
LOGGER.warn("SpringDoc Scalar is enabled by default. To disable it in production, set the property 'scalar.enabled=false' in your production profile configuration.");
}


/**
* Scalar web mvc controller scalar web mvc controller.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
package org.springdoc.webmvc.scalar;

import com.scalar.maven.webjar.ScalarProperties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springdoc.core.configuration.SpringDocConfiguration;
import org.springdoc.core.properties.SpringDocConfigProperties;

Expand All @@ -40,11 +42,13 @@
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.event.EventListener;
import org.springframework.web.filter.ForwardedHeaderFilter;

import static org.springdoc.core.utils.Constants.SPRINGDOC_SWAGGER_UI_ENABLED;
Expand All @@ -64,6 +68,14 @@
@ConditionalOnProperty(prefix = "scalar", name = "enabled", havingValue = "true", matchIfMissing = true)
public class ScalarConfiguration {


protected static final Logger LOGGER = LoggerFactory.getLogger(ScalarConfiguration.class);

@EventListener(ApplicationReadyEvent.class)
public void init() {
LOGGER.warn("SpringDoc Scalar is enabled by default. To disable it in production, set the property 'scalar.enabled=false' in your production profile configuration.");
}

/**
* Scalar web mvc controller scalar web mvc controller.
*
Expand Down