Skip to content
GitLab
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
  • Merge requests
  • !45

Consider minLength, maxLength and pattern in referenced schema

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge min_max_pattern_fix into master May 15, 2018
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: jmini

Reported by @FatCash on https://github.com/swagger-api/swagger-codegen/issues/8001

OAS2 example:

definitions:
  SomeObj:
    type: object
    properties:
      nick:
        $ref: "#/definitions/NickName"
  NickName:
    type: string
    minLength: 1
    maxLength: 3
    pattern: "^[A-Z]+$"

The solution proposed here is really temporary. When we will work on #20, I think that a lot of the methods in DefaultCodegen will be refactored. For example the OpenAPI instance will be propagated everywhere instead of Map<String, Schema>. This way we can use ModelUtils to resolve referenced Schema consistently.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: min_max_pattern_fix