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

[REQ] [Python] A way to avoid strict type checking with an API Client #19224

Open
jobdk opened this issue Jul 23, 2024 · 0 comments
Open

[REQ] [Python] A way to avoid strict type checking with an API Client #19224

jobdk opened this issue Jul 23, 2024 · 0 comments

Comments

@jobdk
Copy link

jobdk commented Jul 23, 2024

Is your feature request related to a problem? Please describe.

In the Python 7.6.0 generator, I am unable to bypass type checking. I want to use the API client with an incorrect body payload, but I cannot find a method to achieve this.

Describe the solution you'd like

A way to configure type checking or provide a method that bypasses type checking

Describe alternatives you've considered

  • Using model config, but this is not accessible with these types.
  • Using other available routes

Additional context

I apologize if this functionality is already available, but I have not been able to find a solution.

Generated post route

I need to pass a file that is not StrictBytes or StrictStr.

@validate_call
    def files_post(
        self,
        id: Annotated[StrictStr, Field(description="")],
        file: Union[StrictBytes, StrictStr],
        tags: Annotated[Optional[Dict[str, StrictStr]], Field(description="")] = None,
        region_or_country_code: Annotated[Optional[StrictStr], Field(description="")] = None,
        labels: Annotated[Optional[List[StrictStr]], Field(description="The file labels.")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> FileMetadataInfo:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant