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

Adding FromHeader attribute to generated c# objects #4894

Open
makten opened this issue May 13, 2024 · 0 comments
Open

Adding FromHeader attribute to generated c# objects #4894

makten opened this issue May 13, 2024 · 0 comments

Comments

@makten
Copy link

makten commented May 13, 2024

Is there a way to automatically add "FromHeader" attribute to generated C# objects using a .nswag file? I have added the following to my .nswag file with no success:

.....
"codeGenerators": {
  "openApiToCSharpController": {
"operationProcessors": [
  {
    "type": "MyNamespace.AddHeaderParameterOperationProcessor, MyAssembly"
  }
]
.....

The AddHeaderParameterOperationProcessor class contains the required logic, but this doesn't seem to do anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant