-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
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 issue still exists?
- Have you searched 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
PythonClientCodegen when run against openapi.yaml will produce the followin warning output.
[main] WARN o.o.c.l.AbstractPythonCodegen - Type null not handled properly in toExampleValueopenapi-generator version
5.2.1
OpenAPI declaration file content or url
openapi: 3.0.0
info:
title: API
version: 1.0.0
paths:
/pet:
get:
operationId: get_handler
parameters:
- in: query
name: pet
schema:
$ref: '#/components/schemas/Dog'
responses:
'200':
content:
application/json:
schema:
type: object
description: Success
components:
schemas:
Pet:
type: object
properties:
pet_type:
type: string
Dog:
allOf:
- $ref: '#/components/schemas/Pet'
- type: object
properties:
bark:
type: booleanGeneration Details
openapi-generator generate -i openapi.yaml -g python-flask -t templates --package-name Steps to reproduce
Generate the client using the command above
Related issues/PRs
No similar PR
Suggest a fix
Handle the ComposedSchema example generation in AbstractPythonCodegen -> toExampleValueRecursive.
Reactions are currently unavailable