cyclosproject / ng-openapi-gen

An OpenAPI 3.0 codegen for Angular
MIT License
397 stars 132 forks source link

allOf cause to type to be "any & any: #138

Closed yantrab closed 3 years ago

yantrab commented 3 years ago

for example for this schema -

              "schema": {
                "properties": {
                  "password": { "type": "string", "minLength": 6 },
                  "email": { "format": "email", "type": "string", "allOf": [{ "transform": ["trim"] }, { "minLength": 1 }] }
                },
                "type": "object",
                "required": ["password", "email"]
              }

the result is -

login$Response(params: { password: string; email: any & any }): Observable<StrictHttpResponse<User>> {}

(i using it to forbidden empty string, i using ajv in client side also - https://stackoverflow.com/questions/45888524/empty-values-validation-in-json-schema-using-ajv)

luisfpg commented 3 years ago

Sorry, but the support on generator is limited to valid OpenAPI descriptors. This is out of scope.