[BUG] [Python] arrays validation problems for maxItems/minItems
Created by: SapMaria
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
Validation rules are not added for lists (maxItems/minItems values) to the generated Python SDK (I tested only for Python).
I also tried to add validation rules for string, number and integer. It's ok.
openapi-generator version
4.3.1 (additionaly checked on latest 5.0.0-beta)
OpenAPI declaration file content or url
requestBody:
content:
application/json:
schema:
type: object
properties:
os:
type: object
required:
- name
- version
properties:
name:
type: string
version:
type: string
packages:
type: array
minItems: 1
maxItems: 5
items:
type: string
Generation Details
java -jar openapi-generator-cli-4.3.1.jar generate -i v1.yaml -g python -o ~/projects/sdk-openapi
Steps to reproduce
Just use generator script with default options for python.
Related issues/PRs
Not found.