swagger-codegen icon indicating copy to clipboard operation
swagger-codegen copied to clipboard

Discussion - the naming of angular and angular2 should be corrected

Open taxpon opened this issue 9 years ago • 10 comments

Description
  • Angular2 is no longer Angular2, just Angular officially
    • Actually, the latest stable version is v4 and it is announced that the major version of Angular will be updated every 6 months
  • Angular (in this repo) is officially called AngularJS
Suggest a Fix
  • The naming of each library in this repository should be corrected as the official usage (as follows) so that new users of swagger-codegen will not confuse about naming
before(current) after
typescript-angular (*1) typescript-angularjs
typescript-angular2 typescript-angular (*2)
Note
  • It is possible to make another confuse for existing users, because *1 and *2 is the same name in the above table
  • IMHO, angular version in package.json of typescript-angular2 should be upgraded to v4 with this update
  • If it's ok, I'll file a PR

taxpon avatar May 05 '17 14:05 taxpon

What about consolidating typescript-angular and typescript-angular2 into one and use the "library" option to indicate which version (1x, 2x, 4x) of Angular to use in 2.3.0 branch?

wing328 avatar May 06 '17 12:05 wing328

@wing328 the real (and I think only) delineation that needs to be made is if it is AngularJS (With Scopes) or Angular (With RXJS which is as of 2)

What you proposed I think may require more maintenance than requires. (update new library for every version change) when all we really need to know is basically old scoping or new scoping.

I think taking your same idea and instead of version using something like Legacy / Current or Scope / RxJS would be more fitting as I don't see major changes happening to the way new Angular's HTTP works.

It would definitely be a 2.3.0 breaking changes milestone.

kenisteward avatar May 08 '17 14:05 kenisteward

I upvote @taxpon's suggestion. As mentioned in #5866 I feel like supporting both AngularJS and Angular (>2.x) with one single generator is probably making things more complicated.

I suggest adding something like a --ngVersion flag to determine whether the API client should be generated for use with Angular 2, 3, or 4 etc. so that we can comply with the latest best practices (InjectionToken instead of OpaqueToken) while preserving backwards compatibility withing the Angular (2) family.

sebastianhaas avatar Jun 20 '17 18:06 sebastianhaas

I agree with @taxpon in that the naming should be typescript-angularjs for 1.X and typescript-angular for 2+.

The --ngVersion flag that @sebastianhaas suggested is probably the best approach for now since the Angular releases will be happening with more frequency.

austingreendev avatar Jun 22 '17 15:06 austingreendev

About renaming typescript-angular2 to typescript-angular, my only concern is that there are already developers using typescript-angular and it may catch them by surprise if typescript-angular (in 2.3.0) now generates Angular2 instead. If we highlight it in the release note of 2.3.0, that should mitigate the impact to developers who've been using typescript-angular.

+1 for the --ngVersion flag.

wing328 avatar Jul 02 '17 18:07 wing328

I don't see major changes happening to the way new Angular's HTTP works.

@kenisteward Unfortunately the Http class in Angular (even in 4.2.6) is marked experimental.

The http module is being re-written in Angular 4.3.0. The docs are not yet fully baked, but here is a link to some of them from 4.3.0-rc0.

I do agree with changing the names of the generators as typescript-angular2 is not appropriate and with v5 coming out this fall, it will be even more out of date.

Thanks for all of your work in supporting Angular with these generators!

Splaktar avatar Jul 13 '17 04:07 Splaktar

I plan to do the following based on the suggestion by @taxpon

  1. rename typescript-angular to typescript-angularjs in 2.3.0
  2. rename typescript-angular2 to typescript-angular in 2.3.0

We'll mark these changes as breaking changes with fallback.

If anyone has concern, please reply to let us know.

wing328 avatar Jul 13 '17 04:07 wing328

No concerns I 100 percent agree here.

On Thu, Jul 13, 2017, 12:31 AM wing328 [email protected] wrote:

I plan to do the following based on the suggestion by @taxpon https://github.com/taxpon

  1. rename typescript-angular to typescript-angularjs in 2.3.0
  2. rename typescript-angular2 to typescript-angular in 2.3.0

We'll mark these changes as breaking changes with fallback.

If anyone has concern, please reply to let us know.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/swagger-api/swagger-codegen/issues/5570#issuecomment-314967859, or mute the thread https://github.com/notifications/unsubscribe-auth/AMPLtSZeR3uOSl6TjbijK6kWhjJjNTfJks5sNZ2-gaJpZM4NSBOg .

kenisteward avatar Jul 13 '17 12:07 kenisteward

At some point we need to actually implement the new http client as well. Thanks Google for making me eat my words!

On Thu, Jul 13, 2017, 8:19 AM Kenneth Steward [email protected] wrote:

No concerns I 100 percent agree here.

On Thu, Jul 13, 2017, 12:31 AM wing328 [email protected] wrote:

I plan to do the following based on the suggestion by @taxpon https://github.com/taxpon

  1. rename typescript-angular to typescript-angularjs in 2.3.0
  2. rename typescript-angular2 to typescript-angular in 2.3.0

We'll mark these changes as breaking changes with fallback.

If anyone has concern, please reply to let us know.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/swagger-api/swagger-codegen/issues/5570#issuecomment-314967859, or mute the thread https://github.com/notifications/unsubscribe-auth/AMPLtSZeR3uOSl6TjbijK6kWhjJjNTfJks5sNZ2-gaJpZM4NSBOg .

kenisteward avatar Jul 13 '17 12:07 kenisteward

Closes via #6046

Thanks everyone for the feedback!

wing328 avatar Jul 13 '17 15:07 wing328