autorest icon indicating copy to clipboard operation
autorest copied to clipboard

Duplicate object schemas with 'HostOptions' name detected

Open evan-cx opened this issue 2 years ago • 3 comments

Describe the issue or request Running into an error that I don't understand:

error   | Duplicate object schemas with 'HostOptions' name  detected.
fatal   | Error: 1 errors occured -- cannot continue.
fatal   | Process() cancelled due to failure
error   |   Error: Plugin checker reported failure.
error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.

Full verbose log:

verbose | [1.55 s] Reading OpenAPI 3.0 file file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json
warning | PreCheck/SchemaMissingType | The schema 'RootHal' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambiguous. This has been auto-corrected to 'type:object'
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1065:13
warning | PreCheck/SchemaMissingType | The schema 'PostPublicationsRequest' with an undefined type and declared properties is a bit ambiguous. This has been auto-corrected to 'type:object'
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1176:13
warning | PreCheck/SchemaMissingType | The schema 'Publication' with an undefined type and declared properties is a bit ambiguous. This has been auto-corrected to 'type:object'
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1241:13
warning | PreCheck/SchemaMissingType | The schema 'GetPublicationsIdHalResponse' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambiguous. This has been auto-corrected to 'type:object'
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1339:13
warning | PreCheck/SchemaMissingType | The schema 'ArtifactDescriptor' with an undefined type and declared properties is a bit ambiguous. This has been auto-corrected to 'type:object'
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1382:13
warning | PreCheck/SchemaMissingType | The schema 'GetArtifactsHalResponseItem' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambiguous. This has been auto-corrected to 'type:object'
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1412:17
warning | PreCheck/SchemaMissingType | The schema 'GetArtifactHalResponse' with an undefined type and 'allOf'/'anyOf'/'oneOf' is a bit ambiguous. This has been auto-corrected to 'type:object'
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1423:13
warning | PreCheck/EmptyParentSchemaWarning | Schema 'RootHal' has an allOf list with an empty object schema as a parent, removing it.
    - file:///C:/git/eplans-web-api/src/PublicationAPI/definition.json:1067:21
warning | PreCheck/CheckDuplicateSchemas | Checking for duplicate schemas, this could take a (long) while.  Run with --verbose for more detail.
verbose | [1.78 s] Found and removed 0 duplicate schema
verbose | [1.89 s]   ModelerFour/api-version-mode:client
verbose | [1.89 s]   ModelerFour/api-version-parameter:constant
verbose | [1.89 s]   ModelerFour/use-model-namespace:false
warning | UnkownSecurityScheme | Security scheme tenant is unknown and will not be processed. Only supported types are AADToken,AzureKey,Anonymous
warning | Modeler/UnknownFormatType | Number schema 'schemas:63' with unknown format: 'date-time'. Will ignore.
error   | Duplicate object schemas with 'HostOptions' name  detected.
fatal   | Error: 1 errors occured -- cannot continue.
fatal   | Process() cancelled due to failure
error   |   Error: Plugin checker reported failure.
error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.

Describe your ideas for solutions I can't find HostOptions in my definition file or in the source code for Autorest, so I'm not really sure where to go.

evan-cx avatar Nov 17 '23 00:11 evan-cx

Similar problem here. Duplicate object schemas are detected when the object is defined exactly once in the file.

kliu513 avatar Nov 22 '23 11:11 kliu513