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

Allow dashes and underscores in arg parameter names #428

Open
brikeohane opened this issue Oct 29, 2019 · 2 comments
Open

Allow dashes and underscores in arg parameter names #428

brikeohane opened this issue Oct 29, 2019 · 2 comments

Comments

@brikeohane
Copy link

Motivation

I'd like to mock an external API found here: https://docs.microsoft.com/en-us/azure/cognitive-services/Translator/reference/v3-0-translate. It would be helpful to define all objects and jersey Service API's within conjure since there is no external SDK available for this service. Then, I could just instantiate the service using JaxRSClient and point it to the correct URI (https://api.cognitive.microsofttranslator.com). This is blocked because the service API contains query parameters that are not within the allowed conjure formatting. In this case, api-version contains a dash, which does not match the following regex: ^[a-z]([A-Z]{1,2}[a-z0-9]|[a-z0-9])*[A-Z]?$.

Proposal

Potentially modify this to allow a wider range of parameter names. Is there a reason that we do not allow dashes or underscores in parameter names?

@uschi2000
Copy link
Contributor

uschi2000 commented Oct 30, 2019 via email

@brikeohane
Copy link
Author

@uschi2000 Yes, that is the alternative approach that I am taking. Barely any more lift than using Conjure, so this isn't blocking; more just curiosity

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