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

[api] allow POST for /source/<project>/<package>?view=info #17137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adrianschroeter
Copy link
Member

also completing api documentation

jsc#OBS-352

also completing api documentation

jsc#OBS-352
@github-actions github-actions bot added Documentation 📖 Things regarding our documentation Frontend Things related to the OBS RoR app labels Nov 28, 2024
@@ -10,19 +10,11 @@ get:
name: view
schema:
type: string
# There are further view points, but this documentation is just for view=info
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why shouldn't we document, or at least keep, the rest of the options? I see you removed these options:

  • cpio
  • getmultibuild
  • issues
  • products
  • productrepositories

I see they are still being used in the backend. See:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the cgi parameter set are only valid for this view.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documenting these two endpoints (view being info and view being other values) in different entries is a compromise between the different outputs returned by the same endpoint.

These lines were added to make a reference between each other endpoint in the documentation:

  1. the one you propose to remove, and
  2. this other one (see this endpoint and scroll down until the view parameter):
    See this [other endpoint](<#/Sources - Packages/get_source__project_name___package_name__view_info>) for details.

This makes it easier for documentation users to navigate between both endpoints.

I can understand repeating the values in enum section could be redundant. I'm fine if those lines are removed.

But please, don't remove the reference in the description field. I helps API users find and relate the documentation they are looking for. By the way, I have never heard from any API user complaining about too much, repetitive, or redundant API documentation.

Comment on lines 16 to -25
description: |
Specify which information about a package should be returned.

* `info`: Show source version, md5sums and build description files, among other information.
* `cpio`, `getmultibuild`, `issues`, `products`, `productrepositories`:
See this [other endpoint](<#/Sources - Files/get_source__project_name___package_name_>) for details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this link to the other endpoint will make harder for users to find the endpoint they need. Why do you think removing this section is needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because it is off-topic, the entire files only describes the view=info. The description and results are not valid for other views.

Copy link
Member

@eduardoj eduardoj Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reason as given above: having a link to the endpoint with the other values that the view parameter can have doesn't harm. On the contrary, it helps users find or relate what they are looking for.

Copy link
Member

@eduardoj eduardoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation 📖 Things regarding our documentation Frontend Things related to the OBS RoR app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants