Api

API resource information exposure:

  1. Swagger documentation /v3/api-docs
  2. API meta information /hope/meta/errors|dictionaries|authorities

API environment configuration:

  1. hope.open.api.path configures the documentation directory, default is /v3/api-docs
  2. hope.open.api.enable whether to expose Swagger documentation information, recommended to disable in production environments
  3. hope.open.api.showMeta whether to expose API meta information, recommended to disable in production environments

After 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

Detailed Information

ResourceDescription
/v3/api-docsStandard OAS (Swagger 2.0) documentation
/hope/meta/errorsError code list
/hope/meta/dictionariesDictionary (constant) list
/hope/meta/authoritiesAuthority list