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

OperationHeaders generation problem with headers containing a - #26

Closed
guillaumeserale opened this issue May 2, 2023 · 1 comment · Fixed by #27
Closed

OperationHeaders generation problem with headers containing a - #26

guillaumeserale opened this issue May 2, 2023 · 1 comment · Fixed by #27
Labels
bug Something isn't working

Comments

@guillaumeserale
Copy link
Contributor

When generating Refit Interfaces for operations with header parameters, if the header key contains a - , the resulting code contains an AliasAs, which is ignored by Refit when serializing the header parameters.

Example

parameters:
  - name: api-key
    in: header
    description: ''
    required: false
    schema:
      type: string
   [Header("api_key"), AliasAs("api-key")] string api_key
@guillaumeserale
Copy link
Contributor Author

Since I introduced the feature, I will provide a fix shortly.

@christianhelle christianhelle added the bug Something isn't working label May 2, 2023
@christianhelle christianhelle linked a pull request May 2, 2023 that will close this issue
christianhelle added a commit that referenced this issue 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 a pull request may close this issue.

2 participants