Unable to use generated API Client - Swagger/OpenAPI issue

Hi, I’m trying to use openapi-generator to generate a Swift API Client for an upcoming project.

It seems like the API and swagger doc https://api-docs.bitrise.io/docs/swagger.json have fallen out of sync (or maybe I’m missing something).

When running

curl -H Authorization:MY_TOKEN https://api.bitrise.io/v0.1/builds the value of the branch property comes back as a string, while the swagger doc specifies it is expected to be a nulls.String

 "nulls.String": {
            "type": "object",
            "properties": {
                "string": {
                    "type": "string"
                },
                "valid": {
                    "description": "Valid is true if String is not NULL",
                    "type": "boolean"
                }
            }
        },

Would it be possible to get an updated version of the swagger/OpenAPI doc that’s up to date with the current implementation?

Thanks in advance.

From the Swagger page, if you expand the response model you see:

Executing the API from Swagger for one of my apps, you can see where various fields listed with type “nulls.String” will either have the value of the string, or have NULL. For example, “branch” returns the string “master” but “abort_reason” has a value of null

Image 2021-12-22 at 5.30.19 PM

Hey Cathy. Thanks for the reply. The issue I’m hitting is that the models generated by openapi-generator can’t be used to decode responses from the API.

Bump. Is it better to raise a support ticket for issues like this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.