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
  • Issues
  • #10421
Closed
Open
Issue created Sep 18, 2021 by Administrator@rootContributor9 of 10 checklist items completed9/10 checklist items

[BUG][RUST] Twilio OpenAPI codegen errors

Created by: PiDelport

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
Description

Twilio provides OpenAPI specifications for all of their APIs:

  • https://www.twilio.com/blog/introducing-twilio-open-api-specification-beta
  • https://www.twilio.com/docs/openapi

Twilio's documentation showcases using OpenAPI Generator to generate Rust clients: however, the code generation currently fails for a number of their APIs.

openapi-generator version
  • 5.3.0-SNAPSHOT (latest)
OpenAPI declarations repository
  • https://github.com/twilio/twilio-oai
Generation Details

openapi-generator-cli generate with options:

  • --generator-name rust
  • --library reqwest
  • --additional-properties 'useSingleRequestParameter=true,supportMultipleResponses=true'
Steps to reproduce

See the failing checks in this PR:

  • https://github.com/PiDelport/twilio-oai-rust/pull/1

Specifically, these specs are failing:

  • twilio-oai-events-v1
  • twilio-oai-proxy-v1
  • twilio-oai-taskrouter-v1
  • twilio-oai-verify-v2
Related issues/PRs
Suggest a fix

I made PRs for the issues I've encountered so far:

  • #10419
  • #10420
  • #10432 (not a bug, but strongly affects API usability for Twilio)
  • #10439

I collected the fixes into an integration testing branch:

  • https://github.com/PiDelport/openapi-generator/compare/master...PiDelport:fix-rust-client

With the fixes, the twilio-oai 1.20.2 output builds successfully:

  • https://github.com/PiDelport/twilio-oai-rust/compare/twilio-oai-1.20.2...twilio-oai-1.20.2-fixed
  • Checks
Assignee
Assign to
Time tracking