Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ArrayModels lack schema validations #7356

Closed
1 of 6 tasks
spacether opened this issue Sep 5, 2020 · 0 comments · Fixed by #7357
Closed
1 of 6 tasks

[BUG] ArrayModels lack schema validations #7356

spacether opened this issue Sep 5, 2020 · 0 comments · Fixed by #7357

Comments

@spacether
Copy link
Contributor

spacether commented Sep 5, 2020

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issuue still exists?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When we include schema validations in an ArrayModel, like minItems, they are inset in the CodegenModel instance

openapi-generator version

5.0.0-SNAPSHOT

OpenAPI declaration file content or url
openapi: 3.0.0
info:
  description: >-
    This spec is mainly for testing Petstore server and contains fake endpoints,
    models. Please do not use this for any other purpose. Special characters: "
    \
  version: 1.0.0
  title: OpenAPI Petstore
  license:
    name: Apache-2.0
    url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
tags:
paths:
components:
  schemas:
    ArrayWithValidations:
      type: array
      minItems: 1
      items: {}
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant