-
Notifications
You must be signed in to change notification settings - Fork 183
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
CADL APIView filters out things in the global namespace #5289
Comments
@catalinaperalta you can already do this by generating a token file manually (likely not by using a URL). Since this pertains to the automatically generated APIView, this would fall to Central EngSys. |
@tjprescott you mean that the automatically generated APIView from that PR is not correct? what it is missing? |
@maririos the automatic PR is only targeting main.cadl. @catalinaperalta wants it to target client.cadl (which will pull in main.cadl) so that she sees the effect of the sidecar file. However... for automatic PRs, it doesn't really make sense to apply the sidecar. It's supposed to a be a view of the service, not the client. So perhaps in this use case, the only appropriate course of action is to make a manual APIView targeting the client.cadl. In theory this could be done with the URL-based manual review as well by pointing to the client.cadl file. |
So assuming that the manual PR where you target a URL works by targeting a client.cadl file, I think this issue could actually be closed. |
@tjprescott I manually generated to token file for the CADL APIview and uploaded that one. I did not use the URL since I wasnt sure what URL was expected. So should the manual token file have showcased the client.cadl? I did not see it in the API view I uploaded. |
Maybe I'm on an older version of the package? This is what I'm using:
|
The manual token file (assuming you targeted client.cadl) should include all of your augment decorators. |
@praveenkuttappan could you help with this?
More on issue: #5273 |
Baedon the above message, @catalinaperalta is asking about manual review gen locally by running the parser and so this should be something @tjprescott needs to check the parser and help. |
@praveenkuttappan targeting a client.cadl file by running the parser locally already works. The question is whether it works for the URL-based manual APIView. Even though the issue requested it, I don't think it makes any sense for automatic APIViews to target client.cadl (or to even enable that). |
@catalinaperalta what is the link to the APIView generated and what command did you use to generate it? It should look something like: |
So I assume we don't need any change in central engsys side. We have another issue to track improving guidelines on how to create API review for CADL. |
Sorry for the delay @tjprescott, I did use exactly that command. I also just tried it again with the same result. Command: cadl compile .\client.cadl --emit="@azure-tools/cadl-apiview" |
@catalinaperalta this happens because your client declarations are not inside a namespace: |
I see. Is the namespace required for the CADL Azure DPG declarations? If so, I think we may need to document this somewhere and/or have it as a linter rule. Thanks for looking into this @tjprescott! |
Well, if you put it any namespace starting with Also, I opened this issue (microsoft/typespec#1625) that I ran into while looking into this. But for now you should be unblocked. |
Can we add the CADL DPG modifications that are defined in client.cadl?
Example CADL that did not include client.cadl definitions: https://apiview.dev/Assemblies/Review/205e1a393e0c4ed8b5a42fb5ba5988cd
PR for the CADL API view shared above: https://github.com/Azure/azure-rest-api-specs-pr/pull/10411
The text was updated successfully, but these errors were encountered: