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

Small fix needed to enable GHES #120

Open
pberthonneau opened this issue Feb 8, 2022 · 0 comments
Open

Small fix needed to enable GHES #120

pberthonneau opened this issue Feb 8, 2022 · 0 comments

Comments

@pberthonneau
Copy link

Hi

I have been generating the lib and doc with the Open API description for GHES 3.3.
All is fine except a small thing impacting pure GHES enterprise capabilities:

build_lib.py generates the metadata.py with for example

 ('/users/{username}/suspended', 'put', 'enterprise-admin/suspend-user', 'Suspend a user', '[email protected]/rest/reference/enterprise-admin#suspend-a-user', [], [['reason', str]], ''),

which is converted in doc as

The problem is with the minus in enterprise-admin. In Python a method cannot have a minus in its name.
When I replace with enterprise_admin everything is fine and I can call the API.

Then I think a specific replacement of - by _ should be added to https://github.com/fastai/ghapi/blob/master/90_build_lib.ipynb

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

1 participant