Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort types #299

Merged
merged 1 commit into from
Oct 4, 2021
Merged

Sort types #299

merged 1 commit into from
Oct 4, 2021

Conversation

RoCat
Copy link
Contributor

@RoCat RoCat commented Sep 29, 2021

For some reasons sometimes swagger files swap their types and types properties order
e.g.

export interface Country {
  /** @format int64 */
  id?: number;

  /** @format double */
  latitude?: number;

  /** @format double */
  longitude?: number;
}

becames

export interface Country {
  /** @format int64 */
  id?: number;

  /** @format double */
  longitude?: number;

  /** @format double */
  latitude?: number;
}

I added a sortTypes params to avoid that and reorder types / types params alphabetically. The main goal is to avoid fake changes on commiting API files.

@RoCat
Copy link
Contributor Author

RoCat commented Sep 29, 2021

it seems to answer the issue #151

@js2me
Copy link
Member

js2me commented Oct 4, 2021

Hello @RoCat ! Thank you for this cool feature request!

@js2me js2me merged commit 4627926 into acacode:next Oct 4, 2021
grandsilence pushed a commit to grandsilence/swagger-typescript-api-nextgen that referenced this pull request May 16, 2022
Co-authored-by: rcatoio <rcatoio@doubletrade.com>
@NikYushchenko NikYushchenko mentioned this pull request May 30, 2022
js2me added a commit that referenced this pull request Aug 15, 2022
* Feature: allow passing "patch" option to "swagger2openapi" (#283)

Co-authored-by: cassel <xavier.cassel35@gmail.com>

* Loads prettier config from user's project (#286)

* fix: problem with missing HttpResponse type with --to-js option

* fix: missing extractRequestBody field in type

* fix(reject): fix reject and exit with code 1 if error (#295)

* fix(reject): fix reject and exit with code 1 if error

* feat: add a parameter to sort types and types properties (#299)

Co-authored-by: rcatoio <rcatoio@doubletrade.com>

* feat: add an option to disable throwing an error when request.ok is not true (#297)

Co-authored-by: rcatoio <rcatoio@doubletrade.com>
Co-authored-by: Sergey S. Volkov <js2me@outlook.com>

* fix: fix missing `title` of object type (#303)

* chore: refresh auto generated code; chore: add axios to dev deps

* bump: up to 9.3.0

* bump: up to 9.3.1; fix: axios

* chore: fix typo (#376)

* 304 Support readOnly properties (#365)

* allow mutually exclusive input options (#327)

Co-authored-by: Sergey S. Volkov <js2me@outlook.com>

* Update fetch-http-client.eta (#329)

* BREAKING_CHANGE: add --extract-response-body option; bump: version to 9.4.0

* feat: added authorization token to headers
Co-authored-by: MarcinFilipek <filipekmarcin180@gmail.com>

* feat: --extract-response-error option

* chore: refresh code gen tests

* fix: change COMPLEX_NOT_OF to COMPLEX_NOT (#356)

* Fix request format and allow for files in request - With code review changes (#350)

* fix pick format
allow for file array in form data requests

* fixed code review suggestions

Co-authored-by: Daniele De Matteo <daniele@kuama.net>
Co-authored-by: Sergey S. Volkov <js2me@outlook.com>

* Pass through required properties to allOf/anyOf/oneOf children (#342)

* Pass through required properties to allOf children

* extend fix to anyOf and oneOf

* fix: account for children making parent fields required

Co-authored-by: Anders Cassidy <anders.cassidy@dailypay.com>
Co-authored-by: Daniel Playfair Cal <dcal@atlassian.com>
Co-authored-by: Sergey S. Volkov <js2me@outlook.com>

* Add option to change main Api class name (#320)

* Update api.eta

* Update index.d.ts

* Update index.js

* Update index.js

* Update config.js

Co-authored-by: Sergey S. Volkov <js2me@outlook.com>

* fix: missing stringifyFormItem method; bump: up version to 10.0.0

* docs: update docs, changelog, fix: problem with complex types (makeAddRequiredToChildSchema)

Co-authored-by: Xavier Cassel <57092100+xcassel@users.noreply.github.com>
Co-authored-by: cassel <xavier.cassel35@gmail.com>
Co-authored-by: Adrian Wieprzkowicz <Argeento@users.noreply.github.com>
Co-authored-by: EvgenBabenko <evgen.babenko@gmail.com>
Co-authored-by: RoCat <catoio.romain@gmail.com>
Co-authored-by: rcatoio <rcatoio@doubletrade.com>
Co-authored-by: 卡色 <cipchk@qq.com>
Co-authored-by: 江麻妞 <50100681+jiangmaniu@users.noreply.github.com>
Co-authored-by: Kasper Moskwiak <kasper.moskwiak@gmail.com>
Co-authored-by: Ben Watkins <ben@outdatedversion.com>
Co-authored-by: bonukai <bonukai@protonmail.com>
Co-authored-by: baggoedw <92381702+baggoedw@users.noreply.github.com>
Co-authored-by: Marcus Dunn <51931484+MarcusDunn@users.noreply.github.com>
Co-authored-by: Daniele De Matteo <daniele@kuama.net>
Co-authored-by: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
Co-authored-by: Anders Cassidy <anders.cassidy@dailypay.com>
Co-authored-by: Daniel Playfair Cal <dcal@atlassian.com>
@js2me
Copy link
Member

js2me commented Aug 18, 2022

@all-contributors please add @RoCat for code ideas design

@allcontributors
Copy link
Contributor

@js2me

I've put up a pull request to add @RoCat! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants