Framework
ApiHug SDK spring API Extension
API resource information exposure:
/v3/api-docs
/hope/meta/errors|dictionaries|authorities
API environment configuration:
hope.open.api.path
configures the documentation directory, default is /v3/api-docs
hope.open.api.enable
whether to expose Swagger documentation information, recommended to disable in production environmentshope.open.api.showMeta
whether to expose API meta information, recommended to disable in production environmentsAfter the project starts, you can see similar information in the command line:
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
Profile(s) dev
All these resource metadata are generated by the wire
module, not obtained through runtime code reflection scanning;
Both the API and API meta information are fixed during the design phase and cannot be modified at runtime!
If modifications are needed, you must recompile and publish your wire
module, which is the API definition module!
It is recommended to disable the exposure of such information interfaces in production environments
Resource | Description |
---|---|
/v3/api-docs | Standard OAS (Swagger 2.0) documentation |
/hope/meta/errors | Error code list |
/hope/meta/dictionaries | Dictionary (constant) list |
/hope/meta/authorities | Authority list |