Closed johnhebron closed 5 months ago
tagging @LukeHagar. Thank you!
Hey @johnhebron, This is so fantastic to see, and Thank you so much for the PR!!!
A couple of things to note that may make it easier, I built out a tool for easily converting JSON responses to Open API schemas, I just throw my responses from my server in there and then we still get the example values populated in the schema as well.
Additionally, I am ALSO working on a ruby gem, and mine would also be auto-generated, but it would be through the AMAZING platform Speakeasy has built, that I am a huge fan of so far.
I welcome input and feedback on that as it becomes available, which will be hosted in this repo
I'm going to make a small change to this PR, just to adjust the formatting and add the examples, and them I'm going to merge it in.
And after fixes to my fixes (lol)
Hi there! Unsure of the format you'd like here, but I found the spec and am hoping to use it to build a Ruby gem! Ty so much for your work! Please let me know if there are any changes that I should make before requesting a merge.
Intent
Add the response body for the getLibraries operationId.
Work completed
/pms/paths/libraries.yaml
and added acontent
for the200
response.I crafted this content section using https://swagger-toolbox.firebaseapp.com/ and the raw body from a request to my local Plex server.
I did this using the command
Downstream Ruby SDK Generation Proof
To prove that the sdk generation is working and includes the new changes, I am building a ruby gem and using it in a test project.
Setup Test Ruby Project with Built Gem Files
Build ruby gem files using the command:
Reference built gem in test project Gemfile
I did this by creating a Gemfile as follows:
In my project file, I include the built gem files as such:
Example Ruby code used:
Test Out With New Gem File Changes
Now, to test if the change (adding the response body) is reflected.
To do this, I ran the example ruby file above before and after the changes and compared the output.
Output before changes
Before the change, the output showed nil for the Data value and a status code of 200
Output after changes
After the change, the output showed the expected body data for the Data value and a status code of 200