forked from Archives/Athou_commafeed
generate a nicer url in documentation (/rest instead of /openapi/../rest)
This commit is contained in:
@@ -5,7 +5,7 @@ function ApiDocumentationPage() {
|
|||||||
return (
|
return (
|
||||||
// force white background because documentation does not support dark theme
|
// force white background because documentation does not support dark theme
|
||||||
<Box style={{ backgroundColor: "#fff" }}>
|
<Box style={{ backgroundColor: "#fff" }}>
|
||||||
<RedocStandalone specUrl="openapi/openapi.json" />
|
<RedocStandalone specUrl="openapi.json" />
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default defineConfig({
|
|||||||
"/rest": "http://localhost:8083",
|
"/rest": "http://localhost:8083",
|
||||||
"/next": "http://localhost:8083",
|
"/next": "http://localhost:8083",
|
||||||
"/ws": "ws://localhost:8083",
|
"/ws": "ws://localhost:8083",
|
||||||
"/openapi": "http://localhost:8083",
|
"/openapi.json": "http://localhost:8083",
|
||||||
"/custom_css.css": "http://localhost:8083",
|
"/custom_css.css": "http://localhost:8083",
|
||||||
"/custom_js.js": "http://localhost:8083",
|
"/custom_js.js": "http://localhost:8083",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
<version>2.2.19</version>
|
<version>2.2.19</version>
|
||||||
<?m2e ignore?>
|
<?m2e ignore?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputPath>${project.build.directory}/classes/assets/openapi</outputPath>
|
<outputPath>${project.build.directory}/classes/assets</outputPath>
|
||||||
<outputFormat>JSONANDYAML</outputFormat>
|
<outputFormat>JSONANDYAML</outputFormat>
|
||||||
<resourcePackages>
|
<resourcePackages>
|
||||||
<package>com.commafeed.frontend.resource</package>
|
<package>com.commafeed.frontend.resource</package>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import io.swagger.v3.oas.annotations.servers.Server;
|
|||||||
|
|
||||||
@OpenAPIDefinition(
|
@OpenAPIDefinition(
|
||||||
info = @Info(title = "CommaFeed API"),
|
info = @Info(title = "CommaFeed API"),
|
||||||
servers = { @Server(description = "CommaFeed API", url = "../rest") },
|
servers = { @Server(description = "CommaFeed API", url = "rest") },
|
||||||
security = { @SecurityRequirement(name = "basicAuth") })
|
security = { @SecurityRequirement(name = "basicAuth") })
|
||||||
@SecurityScheme(name = "basicAuth", type = SecuritySchemeType.HTTP, scheme = "basic")
|
@SecurityScheme(name = "basicAuth", type = SecuritySchemeType.HTTP, scheme = "basic")
|
||||||
public class OpenAPI {
|
public class OpenAPI {
|
||||||
|
|||||||
Reference in New Issue
Block a user