Azure / Azure/azure-openapi-validator
Warning is reported when resource name has no plural form
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 57
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
**Describe the bug**
There are some words that have no plural form ending with "s".
Our swagger resource name is "HybridAksClusterData", which produces
- operation ID: HybridAksClusterData_Get
- URL: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkCloud/hybridAksClusterData/{hybridAksClusterName}
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): **
- OS: WLS2 Ubuntu 20.04
- Autorest version:
```
AutoRest code generation utility [cli version: 3.6.1; node: v17.9.0]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
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)
Contributor guide
Assessment
This issue has not been assessed yet.