Open tnmtechnologies opened 6 years ago
@tnmtechnologies I think your definition is wrong, you are defining a model it looks like it is possible to use primitives as a model, see https://swagger.io/specification/#schemaObject
so this should be fixed. maybe @jmini has an idea how to fix it?EpsBearerId
, which in turn simply is a primitive type integer
As a workaround, you could either define EpsBearerId
as an object
EpsBearerId:
type: object
properties:
id:
$ref: './TS29571_CommonData.yaml#/components/schemas/Uinteger'
or use
AssignEbi:
type: object
properties:
...
releasedEbiList:
type: array
items:
$ref: './TS29571_CommonData.yaml#/components/schemas/Uinteger'
minItems: 0
@tnmtechnologies would you like to give it a try and provide a fix for this issue?
@macjohnny thank you for your workaround proposal. The second one works. The first one adds an id attribute not required. The EpsBearerId definition is significant at the yaml level as some other ones too. They are business models.
Description
The yaml definitions are available in the OpenAPI declaration file content or url paragraph. The generated source code for the EpsBearerId type is the following one:
The issue is that it holds no attribute.
openapi-generator version
3.2.3
OpenAPI declaration file content or url
Here are the following definitions that lead to the issue in the generated source code. In file TS29518_Namf_Communication.yaml we have the following definitions:
Uinteger is defined in file TS29571_CommonData.yaml
Command line used for generation
Steps to reproduce
Please unzip the attached file and type the command (see above) in the directory where files are stored. The generated files are stored in the generated-files directory. issue.zip
A copy of the generated source files is available under the generated-files.sav folder.
Related issues/PRs
Suggest a fix/enhancement