Skip to content

Conversation

@tiffanyqi
Copy link
Collaborator

Docs: https://github.com/readmeio/rdme/blob/next/documentation/commands/openapi.md#rdme-openapi-upload-spec

Currently, the openapi script must be updated to correspond to readme refactored.

@tiffanyqi tiffanyqi requested a review from a team as a code owner September 30, 2025 00:40
@tiffanyqi tiffanyqi requested review from kathmath and removed request for a team September 30, 2025 00:40
@vercel
Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Oct 1, 2025 10:05pm

annotations:
root: ./src/annotations.openapi.yaml
output: ./out/annotations.openapi.yaml
output: ./out/annotations-api.json
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

these names correspond to the ones in our api reference


on:
push:
branches: [ main ]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i'll put this back after review

@tiffanyqi tiffanyqi mentioned this pull request Sep 30, 2025
// publish the json version
await execAndLog(
'npx', ['rdme', 'openapi', fullPath, `--id=${specId}`, `--key=${README_API_KEY}`]
'npx', ['rdme@10.5.1', 'openapi', 'upload', `${fullPath}`, `--key=${README_API_KEY}`, `--slug=${specFile}`, `--confirm-overwrite`],

Choose a reason for hiding this comment

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

On the rdme docs it looks like this command expects some kind of branch value/version. Since this is used for both the production github action on merge to main and the staging action how does this differentiate between the two? I saw previously there was an ID value that was replaced by the slug, does this value also point to branch/version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes. by default, it will post directly to the default version, which in our case is version 3.27 (you might see that tossed around). The github action production script (rdme-openapi) will post this to version 3.27, while within rdme-staging (puts content from both openapi and reference within our dev docs in developer.mixpanel.com to a specific staging version). You might have seen that I commented out the main branch for testing purposes, but I plan to bring it back when I get a successful review; it's more so that you can see what it's supposed to be doing.

Choose a reason for hiding this comment

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

Ok yeah I see the README_VERSION at 3.27 in the rdme-openapi script and README_VERSION set to a value with the github event number that is then passed to this script in rdme-staging.yml. I guess what I'm confused about is it doesn't look like the README_VERSION value is used in the command directly so I would expect based on the documentation that the branch would default to stable. Does the command take directly from the env var or maybe there is a config I'm missing to be used in this command? The previous iteration didn't have branch/version defined either so I assume I'm missing something here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh! I think you're totally right. I'm not super sure about the previous iteration, perhaps the ids are different across branches? I will modify this

Copy link

@gabrielvigil-mixpanel gabrielvigil-mixpanel left a comment

Choose a reason for hiding this comment

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

lgtm

@tiffanyqi tiffanyqi merged commit d4c898a into main Oct 1, 2025
9 checks passed
@tiffanyqi tiffanyqi deleted the tiffany-upgrade-openapi branch October 1, 2025 22:07
efahk pushed a commit that referenced this pull request Nov 12, 2025
* modify workflows

* update publish script

* update to use json versions and rename outputs

* modify test file

* testing

* add debugger

* try without confirm overrite

* try adding a convert step

* use the full path instead for conversion

* fix rdme version

* remove conversion step

* add branch back in

* bring back to main branch only
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants