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

Added simple logic to make most identifier strings valid #562

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

Fargekritt
Copy link
Contributor


name: Pull request
title: 'Added simple logic to make most identifier strings valid'
labels: bug fix
assignees: Fargekritt


Description:

Adds an _ to operationIds that don´t have a valid first char to make safe identifier names
This approach is not perfect and have some flaws but will cover most normal cases. operationId: "return" should @ instead of _but both works
official Identifier-name naming rules

Code Generator creates unsafe interface method names #360

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.90%. Comparing base (ce01537) to head (9772296).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #562      +/-   ##
==========================================
- Coverage   97.31%   94.90%   -2.41%     
==========================================
  Files          52       53       +1     
  Lines        2572     2612      +40     
==========================================
- Hits         2503     2479      -24     
- Misses         46       98      +52     
- Partials       23       35      +12     
Flag Coverage Δ
unittests 94.90% <100.00%> (-2.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@christianhelle christianhelle self-assigned this Dec 13, 2024
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.

@Fargekritt Good stuff! Thanks for taking the time to work on this

I pulled this branch and tried it out locally and also tried the test case you provided to run on the main branch and it failed as it should

@christianhelle christianhelle added the enhancement New feature, bug fix, or request label Dec 13, 2024
@christianhelle
Copy link
Owner

This resolves #360

@christianhelle christianhelle merged commit 3d7bb2d into christianhelle:main Dec 13, 2024
7 of 8 checks passed
@christianhelle christianhelle linked an issue Dec 13, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, bug fix, or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Generator creates unsafe interface method names
2 participants