Closed raffis closed 1 year ago
Hi @raffis , there are some other known edge cases like this in Github's API. They're quite inconsistent.
As you can see in https://github.com/migueleliasweb/go-github-mock/blob/master/src/gen/gen_mutations.go#L9, there have been a few instances already. What that mutator does is basically intercept the generation process and mutate the final param to be something that would accept any character. Have a look.
I'm happy to let you add this use-case to that file.
Let me know your thoughts.
Let me know your thoughts.
Thats perfect, thanks 👍🏻 , see #44
Currently I have to override this endpoint pattern:
The default is to generate it like:
"/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
However mux would not match an URL likerepos/foo/bar/issues/3/labels/prio/high
The label name contains a slash which is valid in github and that api call also works. However it does not work using the mock as mux does not route it correctly and it ends in
mock response not found for /repos/foo/bar/issues/3/labels/prio/high
Happy to provide a fix for the generator if this is considered a bug.