Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show available endpoints in Swagger #142

Open
jasny opened this issue Dec 17, 2021 · 2 comments
Open

Only show available endpoints in Swagger #142

jasny opened this issue Dec 17, 2021 · 2 comments

Comments

@jasny
Copy link
Member

jasny commented Dec 17, 2021

If a service, like identity indexing, is disabled, the endpoints for that controller should not be shown in Swagger.

This can be done by explicitly including modules (https://docs.nestjs.com/openapi/introduction#document-options). But maybe there's a better option.

@sbrekelmans
Copy link
Contributor

Will the api remain active? Maybe it's more clear to keep the api in swagger, but to return a message or error stating indexing for service x is disabled on the node.

If a service depends on the api, and the indexing is switched off for some reason, the service won't be able to tell the difference between (for example) a hash not being found or just removed from the index. An error message that states the indexing is turned off would be better I think.

@jasny
Copy link
Member Author

jasny commented Dec 21, 2021

The indexer doesn't necessarily index everything. If it only indexes anchors from your trust network, it give a 404 if the hash was anchored by an address outside your trust network. It up to you to properly configure the service to match your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants