Skip to content
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

"Team.units_map" field is an object, not an string array! #21307

Closed
ozgurceozturkce opened this issue Oct 1, 2022 · 6 comments · Fixed by #21347
Closed

"Team.units_map" field is an object, not an string array! #21307

ozgurceozturkce opened this issue Oct 1, 2022 · 6 comments · Fixed by #21347
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@ozgurceozturkce
Copy link

Description

The problem experienced due to some uncertainties and deficiencies in the documentation is as follows.

The unit_map field in the Team model defined in Gitea is shown as an string, but the response returns as an object. There is also no model related to the units_map field. Also, as an example in the documentation description, text starts with a object sign '{' and ends with a array sign ']'.

Please see refer to the definition and example of the unit_map field in Team model introduction in documentation at this link.

Gitea Version

1.17.2 and (for doc try.gitea.io - 1.18.0+dev-478-g08609d439)

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

resim

Git Version

2.37.1

Operating System

Windows Server 2022

How are you running Gitea?

Gitea version 1.17.2 executable on Windows Server 2022.

Database

MySQL

@wxiaoguang
Copy link
Contributor

What do you mean?

image

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Oct 5, 2022
@ozgurceozturkce
Copy link
Author

resim

As seen in the screenshot I attached, the sample json text starts with an object sign but ends with a string sign. It also comes as a model object, not a plain string, and I can get it with a Dictionary<TKey, TValue> but at first I perceived it as an object according to the information here.

@wxiaoguang
Copy link
Contributor

That's a typo in comment and affects nothing, it could be fixed.

@wxiaoguang
Copy link
Contributor

As seen in the screenshot I attached, the sample json text starts with an object sign but ends with a string sign.

It means that the values in the object are strings.

@ozgurceozturkce
Copy link
Author

Yes the typo is simple and fixable. I say respectfully, not with the thought of an accusation or problem, I wish there were a little more explanatory and understandable documentation. Of course, the gitea team is doing their best, I'm sure of that and I'm grateful. Also, thank you for your help and explanation. The correction will not be made immediately, but I am closing the issue as done.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Oct 5, 2022

Thank you for your catch and suggestion. The unit_map : { <*>: string } format is generated by Swagger automatically, IIRC it's widely used already for object map? I am not sure it's possible to change it or use other formats at the moment.

The PR #21347 will fix the comment.


image

@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
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants