-
Notifications
You must be signed in to change notification settings - Fork 7
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
Demonstrate Microcks Mocking #21
base: main
Are you sure you want to change the base?
Conversation
🤖 API structural change detected: Modified (1)
|
1f58daa
to
0e9c6d6
Compare
475e00d
to
777b99e
Compare
This will help make sure the OpenAPI is working well within Microcks.
eee3c70
to
63166cb
Compare
@paulRbr @scharrier I have updated the microcks pull request as it had a few unrelated changes, so you can clearly see what needs to be done in order for a OpenAPI to work with both Bump.sh and Microcks. Microcks currently requires a) named examples, and b) variables in the response examples in order to reuse request parameters. The names examples show up the same as usual, but they do make the OpenAPI a little more clunky. The variables in the response show up literally in Bump.sh and this of course makes no sense to the user. So, questions:
Probably B, I thought of that mid writing this all out. 😆 Still, thoughts on this would be welcome when you have a moment. |
@@ -24,6 +24,11 @@ info: | |||
servers: | |||
- url: https://api.example.com | |||
description: Production | |||
x-internal: false | |||
|
|||
- url: https://mocks.example.com/rest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we manage to get a hosted microcks instance up and running I'd like to update this to point there. @lbroudoux
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now have a ready to use / managed instance for hosting the Train Travel API => https://try.microcks.io using guest
/guest
. I don't have communicate on this yet but can already have a look (even if the API is not yet loaded in)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've had a look and its really cool. When we get the TT API into it I will update this.
I tried this after our conversation but relying on single default example raise a lot of other question in the case of multiple response codes, response formats and so on. It works with very basic API (1 input/1 output) but doesn't work with realistic ones.
This is definitely possible to move those "advanced" examples using expressions into another OpenAPI file. |
This branch aims to get the Train Travel API working with Microcks as smoothly as possible, with good dynamic responses and minimal errors showing up in the Spectral ruleset.