OpenAPITools / OpenAPITools/openapi-generator

[BUG] Unable to set 'access_token' on api Configuration

Open
#13,315 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • [x ] Have you provided a full/minimal spec to reproduce the issue?
  • [ x] Have you validated the input using an OpenAPI validator (example)?
  • [ x] Have you tested with the latest master to confirm the issue still exists?
  • [ x] Have you searched for related issues/PRs?
  • [ x] What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

This is for the python-experimental client generator.

When working with a 'bearer' access token, I am unable to set the 'access_token' property in the Configuration() initializer. Instead, I have to do this:

configuration = client_api.Configuration(
    host=URL,
)
configuration.access_token = getToken()

ideally I would be able to do this:

configuration = client_api.Configuration(
    host=URL,
    access_token = getToken()
)
openapi-generator version

latest master (8/30/2022)

OpenAPI declaration file content or url

N/A

Related issues/PRs
Suggest a fix

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the python-experimental client generator's Configuration initializer and compare its accepted arguments with the documented access_token assignment. Reproduce the initializer call using host and access_token, then verify that the generated configuration accepts and retains the token without a separate assignment.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.