Skip to content

[API] GET ​/repos​/{owner}​/{repo}​/contents​/{filepath} Swagger/OpenAPI description does not describe content response #19514

Closed
@svanacker

Description

@svanacker

Description

[API] GET ​/repos​/{owner}​/{repo}​/contents​/{filepath} Swagger/OpenAPI description does not describe content response. It only describe http status code like 200 or 404, but not the content.

the API works well when using a browser or an tool like Postman, but the description does not mention that it returns content like it is described in the swagger documentation : https://swagger.io/docs/specification/describing-responses/

When using generated client with OpenAPI, like https://github.com/zeripath/java-gitea-api, the problem is that the generated method returns null, instead of returning a wrapper around a file content.

Gitea Version

1.17

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

Git Version

No response

Operating System

Windows

How are you running Gitea?

I have used both try.gitea.io and try on our own instance

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions