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

feat: "hidden" attribute to exclude exporting method in export_candid!() #451

Merged
merged 5 commits into from
Dec 13, 2023

Conversation

chenyan-dfinity
Copy link
Contributor

Description

Add #[query(no_export)]/#[update(no_export)] attribute to exclude exporting certain endpoints in did file.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@chenyan-dfinity chenyan-dfinity requested a review from a team as a code owner December 12, 2023 18:55
@lwshang
Copy link
Contributor

lwshang commented Dec 13, 2023

The syntax is actually: #[query(no_export = true)] #[update(no_export = true)].

I considered removing the no_ prefix, i.e. #[query(export = false)]. If so , the export option will default to true which is not well supported by #[serde(default)]. So I keep the original name no_export which defaults to false.

@chenyan-dfinity
Copy link
Contributor Author

How about hidden instead of no_export?

@lwshang lwshang changed the title feat: no_export attribute to exclude exporting method in did file feat: "hidden" attribute to exclude exporting method in export_candid!() Dec 13, 2023
@lwshang lwshang merged commit fbacb22 into main Dec 13, 2023
17 checks passed
@lwshang lwshang deleted the no-export branch December 13, 2023 18:42
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

Successfully merging this pull request may close these issues.

2 participants