How expose domain hosts in multiple phases when using spring rest docs?

32 Views Asked by At

Question

Is there a way to create multiple curl hosts with one build in spring rest docs?

Or, if you operate multiple phase servers, how do you expose hosts for each phase?

Information I know

I already know that to change the curl host in the spring Rest docs, add the code below.

        fun documentRequest(): OperationRequestPreprocessor {
            return Preprocessors.preprocessRequest(
                Preprocessors.modifyUris().scheme("https").host("test.dev.com").removePort(), Preprocessors.prettyPrint(),
            )
        }

enter image description here

However, I manage servers by dividing them into three phases: dev, staging, and production servers.

How i found

Specify curl host for each phase in the index.adoc file

=== Domain Host

|===
| phase | host 

| dev
| test.dev.com

| prod
| test.prod.com 

|===

Do you know any other way?

0

There are 0 best solutions below