-
Notifications
You must be signed in to change notification settings - Fork 604
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
[api-documenter] yaml validation error for static/instance methods with same name #1252
Comments
The DocFX yaml files require a unique A closely related problem is to provide a unique In both cases, we need a naming pattern that ideally would satisfy several requirements:
(Elsewhere I pointed out that the TSDoc declaration reference notation meets 1 and 2, but perhaps not 3.) Examples of problematic TypeScript constructs:
The hard part is deciding the right design. That's where the two linked issues got blocked. I haven't had a lot of time to think through this myself, but if you guys could propose a naming pattern, that will help get this resolved quickly. Actually updating the code in the _getUid() function is very easy. @AlexJerabek (who helped with other DocFX design questions) |
Are there any limitations in the pattern of the naming? Meaning, are there any symbols or combinations of symbols that will or potentially create issues. Some ideas that come in my mind would be: |
note: comment written by someone that has never looked on Typescript AST and/or api-exporter output. So let me know if I get something wrong. I think having I saw that the
|
This issue belongs to a family of closely related issues. I've created metaissue #1308 to come up with a unified fix that tackles them all together. |
@octogonz I’ve noticed there were a couple attempts in getting the #1308 issue fixed but it seems that waiting to agree on all problematic naming with typescript constructs is holding off the resolution of other ones that seem to be agreed on. We are currently blocked on overloaded functions and static vs instance naming for making our documentation project be on an automated pipeline. Maybe take the approach of having the list of all the scenarios and making fixes for each one of them and checking them out from the list? |
@Vitalius1 I'm not sure there's a shortcut. Here's where we stand:
So, in a nutshell, fixing TSDoc PR 174 is what will get things moving again. We need to prioritize that. |
@octogonz thanks for the detailed update. Will be patiently waiting for things to happen in the order you described. 👍 |
cc: @aditima |
Status update:
|
PR #1450 fixes this (hopefully). |
When running the
api-documenter
on the api.json file of the@uifabric/utilities
package I get this error thrown:When looking at the
eventgroup.yml
file generated I indeed see that they are the same:... upon further digging into the package itself I found that the issue is from the
EventGroup
class has 2 methods with the name ofraise
. The only difference is that one ispublic static
and the other one is justpublic
.https://github.com/OfficeDev/office-ui-fabric-react/blob/a1947a24c401056a470abcaef37694ae1c8419ef/packages/utilities/src/EventGroup.ts#L75
https://github.com/OfficeDev/office-ui-fabric-react/blob/a1947a24c401056a470abcaef37694ae1c8419ef/packages/utilities/src/EventGroup.ts#L321
Is this something that is a
@uifabric/utilities
package issue that needs to be addressed orapi-documenter
needs somehow to take that into the account?For reference, this is what the api.json file has for both methods:
... and the error is most likely is thrown by this line in the
typescript.schema.json
:https://github.com/Microsoft/web-build-tools/blob/5935e8e3d166d25777c0bd9e187267c29f6eb627/apps/api-documenter/src/yaml/typescript.schema.json#L64
cc: @natalieethell
The text was updated successfully, but these errors were encountered: