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

Incomplete OpenAPI data #1700

Closed
lslezak opened this issue Oct 25, 2024 · 3 comments · Fixed by #1772
Closed

Incomplete OpenAPI data #1700

lslezak opened this issue Oct 25, 2024 · 3 comments · Fixed by #1772
Labels
bug Something isn't working

Comments

@lslezak
Copy link
Contributor

lslezak commented Oct 25, 2024

Use case

I created an online Agama demo at https://agama-online-demo.surge.sh/. I collected the testing data by recording the HTTP responses while clicking around in the browser. But that's inconvenient and fragile (you need to go through all Agama settings, if you miss something then the data is incomplete).

I'd like to automate that, the idea is to get the list of endpoints from the OpenAPI data and query all paths by a script.

But when comparing the current OpenAPI data and the data I got from the browser I found some inconsistencies which block this approach.

Note: In this use case I'm interested only in the GET requests, the same problem or more problems might be with the POST/PUT/... requests.

Missing paths

These paths are missing in the OpenAPI:

  • /api/manager/logs
  • /api/network/connections/:id
  • /api/network/state
  • /api/network/wifi
  • /api/software/issues/product
  • /api/software/issues/software
  • /api/storage/dasd/supported
  • /api/storage/issues
  • /api/storage/zfcp/supported
  • /api/users/issues

Missing /api prefix

Some OpenAPI paths miss the /api prefix:

  • /l10n/locales
  • /questions
  • /users/first
  • /users/root
@imobachgs imobachgs added the bug Something isn't working label Oct 28, 2024
@imobachgs
Copy link
Contributor

Unfortunately, the OpenAPI has never been working at all. We recently did a ton of fixes (see #1564), but it is still a work in progress.

@mvidner
Copy link
Contributor

mvidner commented Nov 12, 2024

The source for the demo is #1662

imobachgs added a commit that referenced this issue Nov 13, 2024
The OpenAPI spec is not complete, as reported in #1700. This PR aims to
add the missing pieces to the spec. As part of the work, I updated the
utoipa dependency to version 5.2 which is much better when it comes to
detect omissions and problems.

## Tasks

- [x] Add missing `/api` prefix.
- [x] Add missing paths.
- [x] Add missing components.
- [x] Migrate to utoipa 5.
- [ ] Add the `issues` spec (postponed).
@imobachgs
Copy link
Contributor

Most of the problems are already fixed by #1564. The issues endpoints are still missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants