-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Add an option to skip "form" model generation #700
Conversation
As discussed on gitter: I think that the default should be to generate all models. If we do so, I tend to prefer option that are activated with cc @jimschubert |
I agree with Jérémie. If we attempt to get clever with optimizing what gets generated, it can be wrong, confusing, or only applicable to the built-in templates. |
👌 let me update the PR accordingly. |
PR update. Please review when you guys have time. |
Tested with: openapi: 3.0.1
info:
title: test issue 405
version: '1.0'
servers:
- url: 'http://localhost:8000/'
paths:
/ping:
get:
operationId: pingGet
responses:
'201':
description: OK
put:
operationId: pingPut
requestBody:
required: true
content:
'multipart/form-data':
schema:
$ref: '#/components/schemas/SomeFormObj'
responses:
'201':
description: OK
components:
schemas:
SomeFormObj:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
SomeObj:
type: object
properties:
id:
type: integer
format: int64
name:
type: string |
* add option to generate all models * update doc * rename option to skipFormModel * update petstore samples * Update doc * Update samples
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
.master
,4.0.x
. Default:master
.Description of the PR
To fix #405
To enable skipping "form" model generation, please use the following as stated in the updated doc: