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

Mark postProcessOperations(Map) as deprecated #431

Merged

Conversation

jmini
Copy link
Member

@jmini jmini commented Jul 1, 2018

Instead of postProcessOperations(Map)

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: master, 3.1.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @OpenAPITools/generator-core-team

Description of the PR

On Codegen Classes we have 2 methods that are similar and redundant:

  • Map<String, Object> postProcessOperations(Map<String, Object> objs)
  • Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels)

They are called at the exact same place with the difference that postProcessOperationsWithModels(..) also gives access to the list of models.

This PR marks postProcessOperations(..) as deprecated and recommend to use postProcessOperationsWithModels(..) instead.

In a future major release (like 4.0.0) we might want to remove postProcessOperations(..) in order to avoid redundant similar methods in our API.

jmini added 2 commits July 1, 2018 17:50
Instead of postProcessOperations(Map)
Conflicts:
	modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpSlimServerCodegen.java
@wing328
Copy link
Member

wing328 commented Jul 5, 2018

Yup, postProcessOperationsWithModels was introduced as developers may still be using postProcessOperations. In the future major release, we should just keep one and notify developers accordingly about the deprecation.

@wing328 wing328 added this to the 3.1.0 milestone Jul 5, 2018
@wing328 wing328 merged commit ab8ec45 into OpenAPITools:master Jul 5, 2018
jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request Jul 7, 2018
* master: (116 commits)
  3.1.0 release (OpenAPITools#486)
  Fix broken link to openapi generator plugin README (OpenAPITools#484)
  show warning message for nodejs server only (OpenAPITools#481)
  Add grokify to Go technical committee (OpenAPITools#479)
  [Slim] Improve codebase decouple (OpenAPITools#438)
  Ensure typescript samples are up to date (OpenAPITools#444)
  Update README.md
  [Golang][client] delete sample output dir before rebuild (OpenAPITools#477)
  update petstore samples (OpenAPITools#478)
  Revert "Improve Docker Tags (OpenAPITools#390)"
  update go client test dependencies (OpenAPITools#468)
  [Golang][client] fix for schema definition name `file` (OpenAPITools#433)
  Fix '.travis' file (syntax)
  make LICENSE GitHub display compatible (OpenAPITools#467)
  Improve Docker Tags (OpenAPITools#390)
  [Golang][client] fix file suffix for _test.go (OpenAPITools#449)
  Remove copy section (OpenAPITools#463)
  Add link to presentation (OpenAPITools#465)
  Use postProcessOperationsWithModels(Map, List) (OpenAPITools#431)
  [C] Adding petstore sample written in C (OpenAPITools#306)
  ...
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants