SolarArbiter / solarforecastarbiter-api

HTTP API and database schema for the Solar Forecast Arbiter
https://api.solarforecastarbiter.org
MIT License
10 stars 6 forks source link

apispec >= 6 breaks #330

Open awig opened 1 year ago

awig commented 1 year ago

Error because of new format requirements for map_to_openapi_type:

  File "/Users/pawi002/software/solar_arbiter/solarforecastarbiter-api/sfa_api/__init__.py", line 16, in <module>
    from sfa_api.spec import spec  # NOQA
  File "/Users/pawi002/software/solar_arbiter/solarforecastarbiter-api/sfa_api/spec.py", line 387, in <module>
    ma_plugin.map_to_openapi_type('string', 'url')(URLFor)
  File "/Users/pawi002/software/solar_arbiter/venv37/lib/python3.7/site-packages/apispec/ext/marshmallow/__init__.py", line 164, in map_to_openapi_type
    return self.converter.map_to_openapi_type(field_cls, *args)
  File "/Users/pawi002/software/solar_arbiter/venv37/lib/python3.7/site-packages/apispec/ext/marshmallow/field_converter.py", line 131, in map_to_openapi_type
    raise TypeError("Pass core marshmallow field type or (type, fmt) pair.")
TypeError: Pass core marshmallow field type or (type, fmt) pair.

for now update requirements to require apispec<6.0 but eventually update the function calls to correct format.