Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !13503

[rust] [rust-server] More abstract functions including integer fitting

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jacob-pro/more-abstraction into master Sep 22, 2022
  • Overview 5
  • Commits 2
  • Pipelines 0
  • Changes 13

Created by: jacob-pro

This is a follow up to my previous PR (https://github.com/OpenAPITools/openapi-generator/pull/13231) which moves more functions into the AbstractRustCodgen.

Three simple functions (generatorLanguage, escapeQuotationMark, escapeUnsafeCharacters) are identical and have just been cut-paste / de-duplicated.

The rest of the changes relate to integer fitting. The new integer fitting code should be a lot more straightforward to understand and more consistent. It also has a much more extensive set of test cases that check the key boundary conditions.

This is however a very slightly breaking change, because there are some strange edge cases where the integer handling currently works differently in rust vs rust-server, which have now been smoothed over. Again like the previous PR I have tried to maintain a compromise making the minimum changes to existing behaviour, but also trying to keep the code sane & consistent.

cc: @frol @farcaller @richardwhiuk @paladinzh

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jacob-pro/more-abstraction