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

Where did you get these OAS specs? #1

Closed
klaude opened this issue Sep 13, 2020 · 6 comments
Closed

Where did you get these OAS specs? #1

klaude opened this issue Sep 13, 2020 · 6 comments

Comments

@klaude
Copy link

klaude commented Sep 13, 2020

Hi! I'm a developer at StackPath. I came across this project browsing through your repos after I saw stackpath/terraform-provider-stackpath#18. I love that you made this! I'm curious though, where'd you find these OAS specs? Judging from the specs' titles It looks like you may have gotten them out of our API reference. If so, I'd love to know how you did it.

I've fielded a few requests for specs from our support team. I have a task to add OAS2 and OAS3 specs to our developer documentation site, but in the meantime if you're willing to share I'd like to relay your process to our support folks. Ain't nobody in trouble, and there's no secret sauce exposed here. I'm just curious. Thanks a lot!

@kraney
Copy link
Owner

kraney commented Sep 14, 2020

Ah, I was hoping nobody would get mad over that. Good to know I didn't expose any secret sauce - it didn't seem likely given that the doc is open to the public, but companies can be picky sometimes.

You are correct, I got the OAS specs from the API reference. Just looking at the interactive docs, I reasoned that it had to be generated from an OAS spec. No way that was all done by hand, it just wouldn't make any sense. So I thought I might find them in there somewhere. I already knew from prior work if I had the spec, I could generate a client using openapi-generator.

...so I opened the Chrome developer console, and just searched for "oas" within the source. I found there is a script tag named "readme-data-oasFiles" that has the OAS JSON directly, and another named "readme-data-oasUrls" that has a web link I presumed would be a link to the OAS - and it was.

So then I used curl to pull them down, and piped them through jq so they were a little more readable. And there you have it. I figured it couldn't be too subversive to do so, since it was right there in the doc, just not in a place that's normally displayed.

image

@kraney
Copy link
Owner

kraney commented Sep 14, 2020

By the way, I've been using StackPath's container service in support of a home / side project - https://tempoprimo.rehearsal.network/ It's been a great service so far!

@kraney
Copy link
Owner

kraney commented Sep 14, 2020

...since no one's asking me to take down the OAS specs, I'll go ahead and close this as an issue...

@kraney kraney closed this as completed Sep 14, 2020
@klaude
Copy link
Author

klaude commented Sep 14, 2020

Hey that's awesome! Do you mind if I show your side project around the office? We like seeing how folks use the platform. Nice finding our OAS specs like that. Eventually we'll have an official page so you won't have to sneak around the developer consoles. Please reach out to our support team if there's anything we can do for you!

@kraney
Copy link
Owner

kraney commented Sep 14, 2020

Not at all, please do. I've reached the point where I'm trying to spread the word and get people interested in using it.

I've reached out to support a couple of times now and gotten great responses, although all they've needed to do so far is help me realize my own mistakes. :)

@klaude
Copy link
Author

klaude commented Sep 14, 2020

Hey it's all good. Thanks for the kind words! I'm glad we could help. Please please reach out if you need anything.

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

No branches or pull requests

2 participants