Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #7651
Something went wrong while setting issue due date.
Closed
Open
Issue created 4 years ago by Administrator@rootContributor
  • New related issue

  • Report abuse to administrator

  • New related issue

  • Report abuse to administrator

[REQ] Implement needed common isX properties in java Schema classes in openapi core

Closed

[REQ] Implement needed common isX properties in java Schema classes in openapi core

Created by: spacether

Is your feature request related to a problem? Please describe.

The openapi generator core java java classes that implement Schema lack all the same kind of isX properties. One would expect to see:

  • isString
  • isDate
  • isDateTime
  • isFloat
  • isInteger
  • isDouble
  • isNumber
  • isLong
  • isBinary
  • isMap
  • isArray
  • isAnyType
  • isNull
  • hasValidation
  • required
  • hasValidation
  • not
  • discriminator

In these classes:

  • CodegenProperty
  • CodegenModel
  • CodegenParameter
  • CodegenResponse

But these properties are not alway present or are inconsistently named:

  • [FIXED] isDate : not present in CodegenModel
  • [FIXED] isDateTime: not present in CodegenModel
  • [FIXED] isAnyType: not present in CodegenModel
  • [FIXED] isMap: inconsistently named
  • [FIXED] isArray: inconsistently named
  • [ADDED] isNull: missing
  • [FIXED] hasValidation: validations missing from some instances, like object with minProperties

We may be using different names for the same concepts for CodegenResponse: returnType/returnBaseType or dataType/baseType CodegenProperty: complexType/dataType CodegenParameter: dataType/baseType

Describe the solution you'd like

Please add those properties to all of those classes. One clear way to do this would be to implement getter and setter interfaces in IJsonSchemaValidationProperties which is turning into a Schema interface.

Describe alternatives you've considered

  1. just add the properties as public properties in all classes
  2. add getter and setter methods in IJsonSchemaValidationProperties and add properties into the classes
  • I prefer this option because the interface indicates that these are required

Additional context

This topic came up when I was working on https://github.com/OpenAPITools/openapi-generator/issues/7613

An error occurred while loading designs. Please try again.
Tasks
0
server returned results with length 5, expected length of 9

Linked items
0

Link issues together to show that they're related. Learn more.

Activity


Please register or sign in to reply
0 Assignees
None
Assign to
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
Due date
None
None
None
Time tracking
No estimate or time spent
Confidentiality
Not confidential
Not confidential

You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

Lock issue
Unlocked
0
0 participants
Reference:

Menu

Explore Projects Groups Snippets