Description
We are implementing allow-list based access for the sitemap endpoints. Instead of being publicly available, only trusted bots will be able to access them. Because of the change in access model, it does not make sense to surface the endpoint documentation for other users within the sandbox. While this is the first instance of such a requirement, there are future use cases related to API audiences where spec suppression may make sense, such as in the case of private or other limited access modules.
Conditions of acceptance
- API modules can "opt-out" of spec generation.
- If an API module is opted out, an OpenAPI spec is not generated.
- If a module is opted out, it is not listed in the Discovery endpoint, as it has no spec to be discovered.
- This can be configured through a flag in the module definition file.
- Specs are opted-in for spec generation by default, including if the flag is not specified.
- Test this feature using the Site API Module (T409516: Create Site API Module)
- Update the Site API Module to be opted out of spec generation.
- Verify that the Sitemap endpoints are no longer visible in the spec discovery response.