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

Fix for #26 #27

Merged
merged 1 commit into from
May 2, 2023
Merged

Fix for #26 #27

merged 1 commit into from
May 2, 2023

Conversation

guillaumeserale
Copy link
Contributor

Fix for the following issue:

        if(settings.GenerateOperationHeaders)
        {
            headerParameters = operationModel.Parameters
                .Where(p => p.Kind == OpenApiParameterKind.Header && p.IsHeader)
                .Select(p => $"{JoinAttributes($"Header(\"{p.VariableName}\")", GetAliasAsAttribute(p))}{GetBodyParameterType(p)} {p.VariableName}")
                .ToList();
        }

After:

        if(settings.GenerateOperationHeaders)
        {
            headerParameters = operationModel.Parameters
                .Where(p => p.Kind == OpenApiParameterKind.Header && p.IsHeader)
                .Select(p => $"{JoinAttributes($"Header(\"{p.Name}\")")}{GetBodyParameterType(p)} {p.VariableName}")
                .ToList();
        }

@christianhelle christianhelle added the bug Something isn't working label May 2, 2023
@christianhelle christianhelle linked an issue May 2, 2023 that may be closed by this pull request
Copy link
Owner

@christianhelle christianhelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Thanks for the extensive tests as well

@christianhelle christianhelle merged commit 64ca042 into christianhelle:main May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OperationHeaders generation problem with headers containing a -
3 participants