Framework/Spring API
Framework
Expose OpenAPI and generated ApiHug metadata through Spring MVC or WebFlux.
it-common-spring-api serves the metadata generated from proto contracts. It does not build API documentation through runtime reflection. Instead, it exposes the generated resources directly.
The main endpoints are:
/v3/api-docs/v3/api-docs/{version} and /v3/api-docs/{version}.yaml/hope/meta/errors/hope/meta/dictionaries/hope/meta/authorities/hope/meta/versions/v3/api-docs is an OpenAPI 3 document. It is not Swagger 2.0 output.The configuration prefix is hope.api.
| Property | Default | Meaning |
|---|---|---|
hope.api.enable | true | Enable or disable the OpenAPI endpoint |
hope.api.path | /v3/api-docs | Main OpenAPI route |
hope.api.showMeta | true | Expose metadata endpoints |
hope.api.showActuator | false | Show actuator endpoints in the API surface |
hope.api.project.name | - | Bound proto project name |
hope.api.project.latest | true | Serve the latest generated version |
hope.api.mcp.mcpServer | openapi-server | MCP server name |
hope.api.mcp.toolPrefixName | "" | MCP tool name prefix |
hope.api.mcp.serverUrl | - | Runtime base URL for MCP/OpenAPI integration |
Example:
hope:
api:
enable: true
path: /v3/api-docs
show-meta: true
project:
name: my-api-proto
ApiHug uses generated resources on the classpath. The API document, error dictionary, authority list, dictionary list, and versions list are all produced from the contract build output and then exposed by Spring MVC or WebFlux resources.
That means:
Application 'demo-app' is running! Access URLs:
Local http://localhost:18089/
External http://192.168.0.115:18089/
OAS http://192.168.0.115:18089/v3/api-docs
Actuator http://192.168.0.115:18089/management
Api-Errors http://192.168.0.115:18089/hope/meta/errors
Api-Dictionaries http://192.168.0.115:18089/hope/meta/dictionaries
Api-Authorities http://192.168.0.115:18089/hope/meta/authorities
Api-Versions http://192.168.0.115:18089/hope/meta/versions
Profile(s) dev
| Route | Meaning |
|---|---|
/v3/api-docs | Latest OpenAPI JSON |
/v3/api-docs.yaml | Latest OpenAPI YAML |
/v3/api-docs/{version} | Version-specific OpenAPI JSON |
/v3/api-docs/{version}.yaml | Version-specific OpenAPI YAML |
/hope/meta/errors | Domain error catalog |
/hope/meta/dictionaries | Dictionary and constant metadata |
/hope/meta/authorities | Authority metadata |
/hope/meta/versions | Published API versions |
hope.api.enable when the API document should not be public.hope.api.showMeta when metadata endpoints should remain private.it-common-spring-plus/it-common-spring-api/README.mdhope.common.spring.api.HopeApiPropertieshope.common.spring.api.resource.ApiMetaWebMvcResourcehope.common.spring.api.resource.ApiMetaWebFluxResource