Post by nateroiger on Nov 25, 2020 15:16:52 GMT
I'm hitting some similar errors as Redfish OpenAPI code generation when using the Swordfish 1.2.1 and openapi-generator 4.3.1
www.snia.org/sites/default/files/technical_work/PublicReview/swordfish/Swordfish_v1.2.1c_Schema.zip
openapi-generator generate -g go-server -i Swordfish_v1.2.1c_Schema/yaml/openapi.yaml -o out
Several triplet entries where there should be two in the collections:
-Could not find components/schemas/ManagerAccountCollection_ManagerAccountCollection_ManagerAccountCollection ...
-Could not find components/schemas/CertificateCollection_CertificateCollection_CertificateCollection ...
-... ExternalAccountProviderCollection_ExternalAccountProviderCollection_ExternalAccountProviderCollection
-... AggregateCollection_AggregateCollection_AggregateCollection
-... AggregationSourceCollection_AggregationSourceCollection_AggregationSourceCollection
-... ConnectionMethodCollection_ConnectionMethodCollection_ConnectionMethodCollection
-... ChassisCollection_ChassisCollection_ChassisCollection
Several errors related to Certificate_v1_2_1 - again, looks like a doubling of the Certificate_v1_2_1 string
-Could not find components/schemas/Certificate_v1_2_1_Certificate_v1_2_1_Certificate in contents of redfish.dmtf.org/schemas/v1/Certificate.v1_2_1.yaml
-Could not find components/schemas/Certificate_v1_2_1_Certificate_v1_2_1_RekeyRequestBody in contents of redfish.dmtf.org/schemas/v1/Certificate.v1_2_1.yaml
-... Certificate_v1_2_1_Certificate_v1_2_1_RenewResponse
-...
Similar pattern for ExternalAccountProvider, RoleCollection, Role_v1_2_5_Role, AggregationService_v1_0_0_AggregationService_*, Aggregate_v1_0_0_Aggregate_v1_0_0_*, AggregationSource_v1_0_0_AggregationSource_v1_0_0_*, ConnectionMethod_v1_0_0_ConnectionMethod_v1_0_0_*, CertificateService_v1_0_3_CertificateService_v1_0_3_*
After correcting all of them above I am stuck on
Finally, as suggested in Redfish Openapi Code Generation, using --skip-validate-spec it only kicks out some of the models.
www.snia.org/sites/default/files/technical_work/PublicReview/swordfish/Swordfish_v1.2.1c_Schema.zip
openapi-generator generate -g go-server -i Swordfish_v1.2.1c_Schema/yaml/openapi.yaml -o out
Several triplet entries where there should be two in the collections:
-Could not find components/schemas/ManagerAccountCollection_ManagerAccountCollection_ManagerAccountCollection ...
-Could not find components/schemas/CertificateCollection_CertificateCollection_CertificateCollection ...
-... ExternalAccountProviderCollection_ExternalAccountProviderCollection_ExternalAccountProviderCollection
-... AggregateCollection_AggregateCollection_AggregateCollection
-... AggregationSourceCollection_AggregationSourceCollection_AggregationSourceCollection
-... ConnectionMethodCollection_ConnectionMethodCollection_ConnectionMethodCollection
-... ChassisCollection_ChassisCollection_ChassisCollection
Several errors related to Certificate_v1_2_1 - again, looks like a doubling of the Certificate_v1_2_1 string
-Could not find components/schemas/Certificate_v1_2_1_Certificate_v1_2_1_Certificate in contents of redfish.dmtf.org/schemas/v1/Certificate.v1_2_1.yaml
-Could not find components/schemas/Certificate_v1_2_1_Certificate_v1_2_1_RekeyRequestBody in contents of redfish.dmtf.org/schemas/v1/Certificate.v1_2_1.yaml
-... Certificate_v1_2_1_Certificate_v1_2_1_RenewResponse
-...
Similar pattern for ExternalAccountProvider, RoleCollection, Role_v1_2_5_Role, AggregationService_v1_0_0_AggregationService_*, Aggregate_v1_0_0_Aggregate_v1_0_0_*, AggregationSource_v1_0_0_AggregationSource_v1_0_0_*, ConnectionMethod_v1_0_0_ConnectionMethod_v1_0_0_*, CertificateService_v1_0_3_CertificateService_v1_0_3_*
After correcting all of them above I am stuck on
Exception in thread "main" org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 1, Warning count: 167
Errors:
-Could not find definitions/context in contents of redfish.dmtf.org/schemas/v1/odata-v4.yaml
Warnings:
-Could not find definitions/context in contents of redfish.dmtf.org/schemas/v1/odata-v4.yaml
Finally, as suggested in Redfish Openapi Code Generation, using --skip-validate-spec it only kicks out some of the models.