Azure / azure-openapi-validator

Azure Open API Validator
MIT License
47 stars 46 forks source link

Warning is reported when resource name has no plural form #287

Open mbashtovaya opened 2 years ago

mbashtovaya commented 2 years ago

Describe the bug

There are some words that have no plural form ending with "s". Our swagger resource name is "HybridAksClusterData", which produces

In this case, the autorest reports a warning warning | OperationIdNounConflictingModelNames/R2063/SDKViolation | OperationId has a noun that conflicts with one of the model names in definitions section. The model name will be disambiguated to 'HybridAksClusterDataModel'. Consider using the plural form of 'HybridAksClusterData' to avoid this. Note: If you have already shipped an SDK on top of this spec, fixing this warning may introduce a breaking change. Another example if this would be any words that change their form when plural, e.g. "Index" and "Indices" etc.

To Reproduce Use any of the words that have no proper plural form with "s".

Expected behavior No warning should be thrown as there is no rule that states that the resources should always end with "s".

Desktop (please complete the following information):

Showing All Installed Extensions

Type Extension Name Version Location extension @autorest/az 1.8.0 /home/mbashtovaya/.autorest/@autorest_az@1.8.0 extension @autorest/clicommon 0.6.2 /home/mbashtovaya/.autorest/@autorest_clicommon@0.6.2 core @autorest/core 3.7.6 /home/mbashtovaya/.autorest/@autorest_core@3.7.6 core @autorest/core 3.8.1 /home/mbashtovaya/.autorest/@autorest_core@3.8.1 core @autorest/core 3.8.3 /home/mbashtovaya/.autorest/@autorest_core@3.8.3 extension @autorest/modelerfour 4.15.421 /home/mbashtovaya/.autorest/@autorest_modelerfour@4.15.421 extension @autorest/python 5.4.0 /home/mbashtovaya/.autorest/@autorest_python@5.4.0 extension @microsoft.azure/classic-openapi-validator 1.1.13 /home/mbashtovaya/.autorest/@microsoft.azure_classic-openapi-validator@1.1.13 extension @microsoft.azure/openapi-validator 1.7.0 /home/mbashtovaya/.autorest/@microsoft.azure_openapi-validator@1.7.0 extension oav 0.4.70 /home/mbashtovaya/.autorest/oav@0.4.70


- AutoRest core version: any of the installed (3.7.6, 3.8.1, 3.8.3)
jianyexi commented 2 years ago

I think this is by designed for simplifying this rule. Or we need to a dictionary for all the plural words, so it's a warning