Skip to content

[NodeJS/Javascript ] Opeanpi examples support + better JSDOC #11050

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ymoran00
Copy link

@ymoran00 ymoran00 commented Dec 6, 2021

When using the too create nodejs-express-server code, the openapi examples weren't supported.
This meant that it was impossible to have mocks on the automatically generated server.
Added examples support here, implementation copied from mustache in swagger-codegen-cli repo.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@wing328
Copy link
Member

wing328 commented Dec 10, 2021

@ymoran00 thanks for the PR.

cc @YishTish

@wing328
Copy link
Member

wing328 commented Dec 17, 2021

CI failure not related to this change.

@wing328
Copy link
Member

wing328 commented Dec 17, 2021

@wing328 wing328 modified the milestones: 5.3.1, 5.4.0 Dec 29, 2021
@amitpareek2
Copy link

amitpareek2 commented Jan 9, 2022

Hi @ymoran00 , @wing328 , Im also looking for this feature . Can I ask you if there is a timeline for this or it is implemented in latest release ?

{{/returnType}}
* */
const {{{operationId}}} = ({{#allParams}}{{#-first}}{ {{/-first}}{{paramName}}{{^-last}}, {{/-last}}{{#-last}} }{{/-last}}{{/allParams}}) => new Promise(
async (resolve, reject) => {
(resolve, reject) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ymoran00 Should we keep async here?

@wing328 wing328 modified the milestones: 5.4.0, 6.0.0 Jan 31, 2022
@wing328 wing328 modified the milestones: 6.0.0, 6.0.1 May 26, 2022
@wing328 wing328 modified the milestones: 6.0.1, 6.1.0 Jul 5, 2022
@wing328 wing328 modified the milestones: 6.1.0, 6.1.1 Sep 11, 2022
@wing328 wing328 modified the milestones: 6.1.1, 6.2.1 Sep 24, 2022
@wing328 wing328 modified the milestones: 6.2.1, 6.3.0 Nov 1, 2022
@wing328 wing328 modified the milestones: 6.3.0, 6.3.1 Jan 20, 2023
@wing328 wing328 modified the milestones: 6.4.0, 6.5.0 Feb 19, 2023
@wing328 wing328 modified the milestones: 6.5.0, 6.6.0 Apr 1, 2023
@wing328 wing328 modified the milestones: 6.6.0, 7.0.0 May 11, 2023
@wing328 wing328 removed this from the 7.0.0 milestone Aug 11, 2023
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.

3 participants