Skip to content

Commit

Permalink
Fix headers for custom Org (#219)
Browse files Browse the repository at this point in the history
* Fix headers for custom Org
* Fix header
* Update generate_library_oasv2.py

This fix corrects the formatting of the auth header, which is only required when using the generator with one's own organization.
  • Loading branch information
ez1mm authored Jul 12, 2023
1 parent 247b879 commit c19baa1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generator/generate_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def main(inputs):
sys.exit(2)
else:
response = requests.get(f'https://api.meraki.com/api/v1/organizations/{org_id}/openapiSpec',
headers={f'Bearer: {api_key}'})
headers={'Authorization': f'Bearer {api_key}'})
if response.ok:
spec = response.json()
else:
Expand Down
2 changes: 1 addition & 1 deletion generator/generate_library_oasv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def main(inputs):
sys.exit(2)
else:
response = requests.get(f'https://api.meraki.com/api/v1/organizations/{org_id}/openapiSpec',
headers={f'Bearer: {api_key}'})
headers={'Authorization': f'Bearer {api_key}'})
if response.ok:
spec = response.json()
else:
Expand Down

0 comments on commit c19baa1

Please sign in to comment.