Flask-AppBuilder icon indicating copy to clipboard operation
Flask-AppBuilder copied to clipboard

String PrimaryKey generates OpenApi Doc with Integer

Open lnnwvr opened this issue 2 years ago • 1 comments

Environment

Flask-Appbuilder version: 3.1.4

pip freeze output: alembic==1.8.1 apispec==3.3.2 attrs==22.1.0 Babel==2.10.3 certifi==2022.6.15 charset-normalizer==2.1.0 click==8.1.3 colorama==0.4.5 dnspython==2.2.1 email-validator==1.2.1 Flask==2.2.2 Flask-AppBuilder==4.1.3 Flask-Babel==2.0.0 Flask-JWT-Extended==4.4.3 Flask-Login==0.6.2 Flask-Migrate==3.1.0 Flask-SQLAlchemy==2.5.1 Flask-WTF==0.15.1 greenlet==1.1.2 gunicorn==20.1.0 idna==3.3 itsdangerous==2.1.2 Jinja2==3.1.2 jsonschema==4.9.1 Mako==1.2.1 MarkupSafe==2.1.1 marshmallow==3.17.0 marshmallow-enum==1.5.1 marshmallow-sqlalchemy==0.26.1 numpy==1.23.2 packaging==21.3 pandas==1.4.3 prison==0.2.1 PyJWT==2.4.0 pyparsing==3.0.9 pyrsistent==0.18.1 python-dateutil==2.8.2 pytz==2022.2 PyYAML==6.0 requests==2.28.1 six==1.16.0 SQLAlchemy==1.4.40 SQLAlchemy-Utils==0.38.3 urllib3==1.26.11 Werkzeug==2.2.2 WTForms==2.3.3

Describe the expected results

When havint a Model + ModelRestApi and a string primary key swagger doc generates wrong API doc which expects integer instead of string for pk.

lnnwvr avatar Aug 23 '22 14:08 lnnwvr

Thank you for reporting this issue.

This is probably a bug, would you be willing to make a PR?

dpgaspar avatar Sep 05 '22 09:09 dpgaspar