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

rdme openapi command succeeds locally, fails as github action with invalid version error #838

Closed
sarya opened this issue Jul 12, 2023 · 5 comments
Labels
API Underlying issue is with the ReadMe API and not necessarily the `rdme` client itself command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands question Further information is requested

Comments

@sarya
Copy link

sarya commented Jul 12, 2023

I'm trying to use Github Actions to sync an OpenAPI spec. The rdme command I'm using is in the format:

rdme openapi <path_to_file> --key=<key> --id=<api_definition_id>

Locally, the command works as expected, but when I run the same command via Actions, I get the following output:

- Validating the API definition located at <path>...
- Staging your API definition for upload...
- Updating your API docs in ReadMe...
✖ Updating your API docs in ReadMe...
Error: The version you specified (0.1.0) doesn't match any of the existing versions (0.1.0) in ReadMe.

As indicated by the output, I'm specifying the same version as the one used by my readme project, so I'm not sure why this error is occurring.

@kanadgupta
Copy link
Member

Agreed, that is a strange error 🧐 could you send across the following:

  • The version of rdme that you're using
  • A copy of the GitHub Actions workflow file that is running this command (or at least the lines where the rdme syncing step is taking place)
  • A copy of your debug logs1 — see our troubleshooting docs for info on how to obtain these

Footnotes

  1. These debug logs will likely contain sensitive info, so I recommend emailing them to us at support@readme.io.

@kanadgupta kanadgupta added question Further information is requested command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands API Underlying issue is with the ReadMe API and not necessarily the `rdme` client itself labels Jul 13, 2023
@sarya
Copy link
Author

sarya commented Jul 20, 2023

Was able to fix this in the end. I was setting an env variable in the workflow file for the API definition ID, but it wasn't getting mapped to its proper value when the API request was made (i.e. the URL included the text "API_DEFINITION_ID"). Ended up just including the ID directly in the rdme command. The resulting error message could probably still be improved in this case but everything appears to be working.

@sarya sarya closed this as completed Jul 20, 2023
@kanadgupta
Copy link
Member

kanadgupta commented Jul 24, 2023

@sarya mind providing the info requested above? I'm having trouble reproducing that error message, would love to clean that up if possible.

@amkoehler
Copy link

Hey @kanadgupta, ran into the same error above. I first thought it was an issue with my spec so I bumped the version (from 0.1.0 to 0.2.0), but it ended up being an issue with my --id parameter. I was mistakenly using an old endpoint ID that we had deleted. Using the new ID fixed the issue. I'm betting you can recreate this by passing in a deleted or invalid ID to the openapi command.

@kanadgupta
Copy link
Member

Sorry for the delayed response @amkoehler! Believe this is happening because of #920

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Underlying issue is with the ReadMe API and not necessarily the `rdme` client itself command:openapi Issues pertaining to the `openapi`, `validate`, `reduce`, or `swagger` commands question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants