Skip to content

Conversation

@michalcharvat
Copy link
Contributor

The doc block is parsed to detect the @noapi tag, which allows you to exclude a getter from the API while still keeping clean method names starting with get.

@michalcharvat michalcharvat requested a review from mschering April 18, 2025 10:30
@mschering
Copy link
Member

A problem with this approach is that it won’t work in the paid / encoded modules. What do you need it for? Perhaps use a different name?

@michalcharvat
Copy link
Contributor Author

The reason is simple — to keep the code clean while still allowing you to use the getter as usual.
Currently, if you create a getX method, it will automatically be used by the API. With this hint, you can instruct the API parser to exclude that method from the API output.

I have uses or seen somewhere an array of properties that allowed you to include, exclude, or cast attributes when interacting with the API. Maybe the idea with the arrays isnt bad because sometimes you need to exclude passwords etc

If we’re talking about paid modules, I’m not entirely sure at the moment.
Previously, we had to encode one project where we used the @Remotable flag in the documentation, which also registered methods for Ext.Direct—and there was no problem.

@mschering
Copy link
Member

You can also override the atypicalApiProperties() method and list the names you want to exclude.

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.

3 participants