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
  • !401

Restore unit test that consider minLength, maxLength and pattern in referenced schema

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jmini/restore_unit-test_pr45 into 3.1.x Jun 26, 2018
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: jmini

This PR restores the unit test that consider minLength, maxLength and pattern when they are defined in a in referenced schema.

OAS2 example:

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

This was filed as originally as swagger-api/swagger-codegen#8001

I have tried to implement a solution for this with #45, but my solution had too many side effects and was reverted with #82.

This PR brings back the tests without changing anything to the implementation. I think the changes made with #360 by @wing328 solves also issue swagger-api/swagger-codegen#8001.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jmini/restore_unit-test_pr45