Skip to content

Instantiate services with config #300

@clragon

Description

@clragon

First off, lovely package, thank you for making this.

Description
It would be nice to locally configure the OpenAPIConfig of a given API call when making it.

Problem it Solves
In some cases, when writing more complex applications,
it is important for me to be able to change the configuration of a given specific call.

Proposed Solution
I would like to be able to pass an OpenAPIConfig to any request, optionally,
defaulting to the global configuration for any property not specified.

Alternatives Considered
I can alter the global config right when I need to, but this is messy and might lead to complications.

It would also be an idea to be able to instantiate a Service or all Services with a given Config, so that they can be used pre-configured and distributed non-globally, e.g. with a React Context.

Additional Context
It is possible that a generation option for this exists and I just didnt see it anywhere.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions