this post was submitted on 18 Jul 2025
4 points (100.0% liked)

PieFed API & mobile app dev

90 readers
1 users here now

Announcements and discussions about the PieFed API - changes, improvements and general co-ordination between the frontend developers and the core of PieFed.

founded 1 month ago
MODERATORS
top 5 comments
sorted by: hot top controversial new old
[–] idunnololz@lemmy.world 2 points 1 month ago (2 children)

While adding PieFed support to Summit, I used a utility to convert swagger docs to source code and ran into an error in the docs. The docs state that objects like Post, Comment have the field updated however this field doesn't exist. Instead it's being returned as edited_at. Can the docs be updated to correct this? Otherwise I will have to manually maintain this difference on my end.

[–] rimu@piefed.social 2 points 1 month ago (1 children)

afaik the swagger docs are manually updated, not automatically generated from our code so it's not really a current/reliable enough 'source of truth' to be feeding it into your codebase. @andrew_s@piefed.social can you let us know how this works?

[–] idunnololz@lemmy.world 1 points 1 month ago

So far that was the only issue I've found. Everything else looks good.

[–] rimu@piefed.social 2 points 3 weeks ago (1 children)

Since your comment we've been looking into what it would take to auto-generate the swagger docs. The package we're thinking about using produces OpenAPI v2 json but I understand there is now OpenAPI v3 that people have been using for a while. Do you have a need for v3 or would v2 be ok?

[–] idunnololz@lemmy.world 1 points 3 weeks ago

The tool I'm using to generate code from an OpenAPI spec is this one: https://github.com/OpenAPITools/openapi-generator.

From the documentation it says it supports v2 and v3 of the OpenAPI spec so v2 should be ok.