marshmallow-code / apispec

A pluggable API specification generator. Currently supports the OpenAPI Specification (f.k.a. the Swagger specification)..
https://apispec.readthedocs.io/
MIT License
1.18k stars 177 forks source link

Add IP fields to DEFAULT_FIELD_MAPPING #892

Closed cjproud closed 8 months ago

cjproud commented 8 months ago

This relates to https://github.com/marshmallow-code/flask-smorest/issues/623 where Swagger was not obeying required=True for the IPv4 field. This adds the different IP fields to the DEFAULT_FIELD_MAPPING where the type is string the format is the IP address format.

cjproud commented 8 months ago

Thanks. Looks good.

Please complete tests in /tests/test_ext_marshmallow_field.py:

  • test_field2property_type
  • test_field2property_formats

Does this solve marshmallow-code/flask-smorest#623?

Yup this solves that issue 👍