springdoc / springdoc.github.io

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
9 stars 40 forks source link

Non-existing class in documentation #59

Closed xsmrcek closed 1 year ago

xsmrcek commented 1 year ago

Hello, as metioned in issue: https://github.com/springdoc/springdoc-openapi/issues/2321 I am supposed to register this Bean:

@Bean
    fun springDocsUiConfiguration(optionalSwaggerUiConfigProperties: Optional<SwaggerUiConfigProperties?>?): SpringDocsUIConfiguration? {
        return SpringDocsUIConfiguration(optionalSwaggerUiConfigProperties)
    }

But this class doesn't exist.

xsmrcek commented 1 year ago

It's probably typo and class should be SpringDocConfigProperties.

bnasslahsen commented 1 year ago

docs are updated

shivaprasadgurram commented 10 months ago

@Bean SpringDocUIConfiguration SpringDocUIConfiguration(Optional optionalSwaggerUiConfigProperties){ return new SpringDocUIConfiguration(optionalSwaggerUiConfigProperties); }

is not resolvable. I'm referring to https://springdoc.org/#what-is-a-proper-way-to-set-up-swagger-ui-to-use-provided-spec-yml

Note: I'm on 1.6.9 version

shivaprasadgurram commented 10 months ago

This issue resolved after upgraded to 1.7.0

shivaprasadgurram commented 10 months ago

I followed https://springdoc.org/#what-is-a-proper-way-to-set-up-swagger-ui-to-use-provided-spec-yml to host my custom yaml in swagger UI by disabling default /v3/api-docs. But when I hit http://localhost:8080/swagger-ui/index.html I'm getting "Page not found exception" - 404.

Here are my props in app context: springdoc.swagger-ui.url=/openapi-spec.yaml springdoc.api-docs.enabled=false

` @Bean SpringDocConfiguration springDocConfiguration(){ return new SpringDocConfiguration(); }

@Bean SpringDocConfigProperties springDocConfigProperties() { return new SpringDocConfigProperties(); }

@Bean ObjectMapperProvider objectMapperProvider(SpringDocConfigProperties springDocConfigProperties){ return new ObjectMapperProvider(springDocConfigProperties); }

@Bean SpringDocUIConfiguration SpringDocUIConfiguration(Optional optionalSwaggerUiConfigProperties){ return new SpringDocUIConfiguration(optionalSwaggerUiConfigProperties); } `

Could you please help me here?