Closed
Description
Description
pattern
field is removed from swagger.yaml
when generating 'Python Flask' server.
Swagger-codegen version
The one used by http://editor.swagger.io/
Swagger declaration file content or url
---
swagger: '2.0'
info:
version: 1.0.0
title: Test API
paths:
/:
post:
parameters:
- in: body
name: data
schema:
$ref: '#/definitions/Test'
responses:
200:
description: OK
definitions:
Test:
type: string
pattern: '^[01]{1,9}$'
Command line used for generation
http://editor.swagger.io/ was used.
Steps to reproduce
Paste mention config to http://editor.swagger.io/ and let it generate 'Python Flask' server code. In the generated code, pattern
field is missing in swagger.yaml
.
Related issues
Maybe it is related to #2794. Anyways, I see no reason why to strip fields when generating.
Suggest a Fix
Keep pattern
field.