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
  • #3174
Closed
Open
Issue created Jun 18, 2019 by Administrator@rootContributor

Deno typescript OpenAPI generators

Created by: anxiousmodernman

Description

Deno is a new TypeScript runtime built with V8 and Rust. Generating clients and servers from OpenAPI specifications would be a great feature.

The existing TypeScript fetch implementation should work for generating clients, with some modifications. I have done some research to this effect with the spec for Kubernetes. Some of the changes required to get the Deno code to build.

  • change imports to be ".ts" instead of no file extension
  • when importing directory "modules", point the import at "blah/index.ts" instead of just "blah" (the directory)
  • alias the standard DOM types to the Deno dom types.
  • Add the HEAD http method to the generated code (missing for some reason, perhaps a bug in the generator)

Deno strives for browser compatibility, so the fetch implementation is built in. But there are other networking capabilities being developed for Deno, such as dialTLS builtins. The fetch api is probably where authors of OpenAPI generators should focus first, however, as that API is well defined and is unlikely to change in big ways, I imagine.

Generating server-side Deno is something that is feasible, but that API is more likely to change.

Assignee
Assign to
Time tracking