muesli-hd / muesli

Mathematisches Übungsgruppen- und Scheinlisten-Interface
GNU General Public License v3.0
26 stars 13 forks source link

Die OpenAPI.json ist nicht mehr da. #144

Closed Doeniel closed 2 years ago

Doeniel commented 2 years ago

Wenn man im API-Tab auf die Dokumentation drückt, kommt ein Error, dass er die API Definition nicht finden kann.

christian-heusel commented 2 years ago

Wie es scheint wirft die Route halt einen 500er, was sagen die logs @tynsh ?

chris@pioneer ~ » curl -I https://muesli.mathi.uni-heidelberg.de/openapi.json
HTTP/2 500
server: nginx
date: Fri, 17 Dec 2021 11:32:22 GMT
content-type: text/html; charset=UTF-8
content-length: 3103
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
tynsh commented 2 years ago

Ich schau später mal drüber. Hier sind aber die Logs:

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/pyramid/tweens.py", line 41, in excview_tween response = handler(request) File "/usr/local/lib/python3.6/dist-packages/pyramid/router.py", line 148, in handle_request registry, request, context, context_iface, view_name File "/usr/local/lib/python3.6/dist-packages/pyramid/view.py", line 667, in _call_view response = view_callable(context, request) File "/usr/local/lib/python3.6/dist-packages/pyramid/viewderivers.py", line 436, in rendered_view result = view(context, request) File "/usr/local/lib/python3.6/dist-packages/pyramid/viewderivers.py", line 144, in _requestonly_view response = view(request) File "./muesli/web/viewsApi.py", line 89, in api_spec spec.components.schema('User', schema=models.UserSchema(only=allowed_attributes.user())) File "/usr/local/lib/python3.6/dist-packages/apispec/core.py", line 132, in schema ret.update(plugin.schema_helper(component_id, ret, **kwargs) or {}) File "/usr/local/lib/python3.6/dist-packages/apispec/ext/marshmallow/init.py", line 166, in schema_helper json_schema = self.converter.schema2jsonschema(schema_instance) File "/usr/local/lib/python3.6/dist-packages/apispec/ext/marshmallow/openapi.py", line 182, in schema2jsonschema jsonschema = self.fields2jsonschema(fields, partial=partial, ordered=ordered) File "/usr/local/lib/python3.6/dist-packages/apispec/ext/marshmallow/openapi.py", line 208, in fields2jsonschema prop = self.field2property(field_obj) File "/usr/local/lib/python3.6/dist-packages/apispec/ext/marshmallow/field_converter.py", line 172, in field2property ret.update(attr_func(field, ret=ret)) File "/usr/local/lib/python3.6/dist-packages/apispec/ext/marshmallow/field_converter.py", line 219, in field2default default = field.load_default AttributeError: 'Integer' object has no attribute 'load_default'

christian-heusel commented 2 years ago

Hm, keine ahnung, wahrscheinlich hilft ein up- oder downgrade von Marshmallow ... In jedem Fall sollte man einen Test hinzufügen, dass so was das nächste Mal direkt auffällt 😊