Citiverse
  • Another OpenAPI tool crashes and burns


    fentiger@zotum.netF
    2
    0
    Just over a year after Go's OpenAPI generator let me down, the #ActivityPub Content-Type causes the same problem again, this time in Python:
    example_client/api/default/put_object.py:34:62: SyntaxError: Simple statements must be separated by newlines or semicolons
       |
    33 |     _kwargs["json"] = _body
    34 |     headers["Content-Type"] = "application/ld+json; profile="https://www.w3.org/ns/activitystreams""
       |                                                              ^
    Is it really that unusual to include parameters in MIME types like this? I'm sure I've seen them all over the place.

    Or am I venturing off the beaten track by trying to be explicit about them in my openapi.yml file?

    #ActivityPubDev #BangHeadHere
  • helge@mymath.rocksH
    5
    0

    Two things:

    1. If there was an OpenAPI test suite, this should be included. If not, someone, not me, should work on getting this fixed.

    2. Use application/activity+json as almost everyone else and this problem disappears.

  • fentiger@zotum.netF
    2
    0
    @Helge I suppose it's my own stupid fault for trying to actually follow the spec, rather than just pointing to it as an excuse for any interoperability problems. 😉

Citiverse è un progetto che si basa su NodeBB ed è federato! | Categorie federate | Chat | 📱 Installa web app o APK | 🧡 Donazioni | Privacy Policy