Azure / Azure/azure-functions-openapi-extension

Question: OpenApiOAuthFlows configuration options

Open
#168 5 comments 1 reaction 0 assignees View on GitHub
discussion
Dominant language
C#
Stars
388
Forks
202
PR merge metrics
No merged PRs in 30d

Description

I am in the process of trying to configure an `OpenApiOAuthFlows` (for oauth clientcredentials) and was hoping to be able to access configuration (or maybe even other services), but it does not seem to be supported through constructor injection or in any alternative approaches. The error from attempting constructor injection is simply `No parameterless constructor defined for type`.

Is there an approach I am missing, is dependency injection planned, or is there a recommended workaround? (I am guessing reading environment variables directly is a somewhat reasonably approach, if not as nice or flexible as IConfiguration)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how OpenApiOAuthFlows is constructed and how dependency injection or IConfiguration is exposed in the extension. Determine whether constructor injection is supported, planned, or replaceable by a documented workaround. Done means the supported approach or implementation scope is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.