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

support for RPC style HTTP calls #647

Closed
michelecurioni opened this issue Feb 19, 2024 · 4 comments
Closed

support for RPC style HTTP calls #647

michelecurioni opened this issue Feb 19, 2024 · 4 comments

Comments

@michelecurioni
Copy link

Hi,
we'd like to introduce an RPC style to our API that follows this structure:
https://service.name/v1/some/resource/name:customVerb

Up to now we mandated that all path segments be snake case, so the above endpoint would fail rule ibm-path-segment-casing-convention.

Can you suggest a way to incorporate the ":/customVerb" in the above rule?
Or a way to ignore the ":customVerb" part?

"customVerb" should be camel case, but we can probably be lenient and accept any case for that part.

Thanks,
Michele

@dpopp07
Copy link
Member

dpopp07 commented Feb 27, 2024

Hi @michelecurioni

RPC is not supported in OpenAPI v3 (it looks like it won't be supported until v4, so I don't know how you would configure the validator to support those patterns. I don't think it's within our scope to make a provision for.

@michelecurioni
Copy link
Author

@dpopp07 thanks for that link, interesting discussion, but I don't want to focus on the RPC semantics.
I simply wondered if there is an easy way to customize the rule to ignore a part of the url.

@dpopp07
Copy link
Member

dpopp07 commented Feb 29, 2024

I see. There is a way, but I wouldn't necessarily call it easy 🙂

There's not a simple option for controlling this but you can provide your own implementation for the rule that replaces or augments ours. There is some documentation for this style of customization here.

@michelecurioni
Copy link
Author

Thanks, I've implemented a custom rule for this

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