Skip to content

Add API/Model Docs to typescript-fetch codegen #18351

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 22 commits into
base: master
Choose a base branch
from

Conversation

mason-at-pieces
Copy link

Added support for generating api/model docs for typescript-fetch generator.

Related issue: #18276

Related Technical Committee Members: @mkusaka

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/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    (For Windows users, please run the script in Git BASH)
    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*.
    IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
  • File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • 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 Apr 11, 2024

thanks for the PR

cc
@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04)

@wing328
Copy link
Member

wing328 commented Apr 11, 2024

can you please follow step 3 to update the samples to address https://github.com/OpenAPITools/openapi-generator/actions/runs/8640982079/job/23690384008?pr=18351 ?

@mason-at-pieces
Copy link
Author

can you please follow step 3 to update the samples to address https://github.com/OpenAPITools/openapi-generator/actions/runs/8640982079/job/23690384008?pr=18351 ?

Yep, forgot to do it again after the fix.

@mason-at-pieces
Copy link
Author

@wing328 Quick question, do you know how to ensure that the docs are generated inside a docs folder instead of just inside the root of the generated sdk?

@wing328
Copy link
Member

wing328 commented Apr 12, 2024

@mason-at-pieces
Copy link
Author

good question. you will need to override 2 functions to set the folders, e.g.

Perfect, just added that


@Override
public String modelDocFileFolder() {
return (outputFolder + File.separator + modelDocPath);
Copy link
Member

Choose a reason for hiding this comment

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

can you please add .replace('/', File.separatorChar) ?

output folder may contains /

Copy link
Author

Choose a reason for hiding this comment

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

I believe I've updated it to what you wanted

Copy link
Member

Choose a reason for hiding this comment

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

the build failed. please take a look when you've time.

Copy link
Author

Choose a reason for hiding this comment

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

@wing328 Not sure what the issue was but have pushed changes to run and test the build again

@wing328 wing328 modified the milestones: 7.5.0, 7.6.0 Apr 17, 2024
@mason-at-pieces
Copy link
Author

@wing328 Make some updates, should be good to rip another build?

@wing328
Copy link
Member

wing328 commented Apr 19, 2024

the tests still failed. please take another look when you've time

@macjohnny
Copy link
Member

@mason-at-pieces please rebase onto the lastest master branch and re-generate the samples.

@wing328 wing328 removed this from the 7.6.0 milestone Apr 22, 2024
@wing328
Copy link
Member

wing328 commented Apr 24, 2024

with this change, did you run a simple test to generate a petstore ts fetch client? did it fail?

@wing328
Copy link
Member

wing328 commented May 1, 2024

looks like a rebase/merge failed and resulted in lots of commits not authored by you included in this PR

i would suggest you file a new one instead.

@mason-at-pieces
Copy link
Author

looks like a rebase/merge failed and resulted in lots of commits not authored by you included in this PR

i would suggest you file a new one instead.

Yeah, I will just create another branch on my fork and make a new pr from that 👍

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