swagger-api / swagger-api/swagger-codegen

[Angular2][Typescript] Get rid of typings?

Open
#4,761 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

I ran into several issues with the generated client API concerning typings:

1st of all, when the resulting npm project is built, it gives the following deprecation warning:
typings WARN deprecated 2016-9-14: "registry:dt/core-js#0.0.0+20160725163759" is deprecated (updated, replaced or removed)

And the second point, which is quite more important to me: typings cannot properly be used in an offline environment with only a Nexus as proxy. The reason: I figured out how to proxy the typings registry itself, but not the succeeding call to raw.githubusercontent.com

So I asked myself, is it really necessary to have a dependency to typings, since the generated Typescript interfaces should be sufficient for the transpiler and IDE to determine both API methods and models?

Swagger-codegen version

2.2.2-SNAPSHOT

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Angular2/TypeScript client generation templates and the generated npm dependency setup. Check how typings and the generated TypeScript interfaces are used, then verify that an offline build through Nexus works without the typings dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
api, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.