Stream: python

Topic: Analysis of OpenAPI code generators


view this post on Zulip Jan Range (Feb 01 2024 at 12:59):

Dear all, as demonstrated in the last working group meeting, I have set up a repository which evaluates multiple providers to generate code from 5.14 OpenAPI specifications. You can find the repository here:

https://github.com/JR-1991/pyDataverse-generation-analysis

There is still much to be done, but most of it can be handled by designing a comprehensive OpenAPI specification. To demonstrate how code can be used, I have started providing Jupyter Notebooks that test a couple of endpoints. The first example that utilizes the SpeakEasy API can be found here:

Jupyter Notebook

I will post new examples here once ready :raised_hands:

view this post on Zulip Philip Durbin ๐Ÿš€ (Feb 01 2024 at 13:17):

I highly recommend watching the recording of yesterday's call to get oriented.

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 11 2025 at 14:03):

These days we could also try pointing these generators at https://hub.dataverse.org/openapi

view this post on Zulip Jan Range (Apr 14 2025 at 08:42):

I gave it a shot with the PyDantic Generator, but I am not sure what to make of it. There are a lot of fields that seem like to be used internally? I think that it is technically fine, but in some ways it could be confusing for users. Here is an example for DataFile:

DataFile

view this post on Zulip Jan Range (Apr 14 2025 at 08:45):

I cannot speak for Java, but in Python and Rust there are ways to decide which fields flow into the OpenAPI specs. Here is an example from Python:

https://drf-spectacular.readthedocs.io/en/latest/customization.html

view this post on Zulip Philip Durbin ๐Ÿš€ (Apr 14 2025 at 13:17):

Yeah, I don't think indexTime, for example, is particularly interesting to end users.


Last updated: Nov 01 2025 at 14:11 UTC