Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
svanacker opened this issue Apr 26, 2022 · 0 comments · Fixed by #19542
Labels
modifies/api This PR adds API routes or modifies them type/bug

Comments

@svanacker
Copy link

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

@techknowlogick techknowlogick added the modifies/api This PR adds API routes or modifies them label Apr 26, 2022
Gusted pushed a commit to Gusted/gitea that referenced this issue Apr 28, 2022
…n 200

- Set on the description that it returns the raw file content.
- Resolves go-gitea#19514
jolheiser pushed a commit that referenced this issue Apr 28, 2022
…n 200 (#19542)

- Set on the description that it returns the raw file content.
- Resolves #19514
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 24, 2022
…n 200 (go-gitea#19542)

- Set on the description that it returns the raw file content.
- Resolves go-gitea#19514
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants