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

feat: adding a simple CLI #173

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

feat: adding a simple CLI #173

wants to merge 6 commits into from

Conversation

kokovtsev
Copy link
Contributor

@kokovtsev kokovtsev commented May 3, 2023

Resolves #172

@kokovtsev kokovtsev requested a review from Nedgeva May 3, 2023 10:06
@Nedgeva
Copy link
Collaborator

Nedgeva commented May 8, 2023

LGTM. Let's update dox a bit and then proceed with merging.

README.md Outdated Show resolved Hide resolved
@reviewpad reviewpad bot mentioned this pull request May 11, 2023
9 tasks
@reviewpad reviewpad bot requested a review from dramoturg May 12, 2023 09:01
@reviewpad reviewpad bot added medium Pull request is medium waiting-for-review labels May 12, 2023
@reviewpad
Copy link
Contributor

reviewpad bot commented May 12, 2023

Reviewpad Report

‼️ Errors

  • Unconventional commit detected: 'Merge remote-tracking branch 'origin/master' into feature/cli' (f67dd52)

⚠️ Warnings

  • Please rebase your pull request on the latest changes

@andr3medeiros
Copy link
Collaborator

/reviewpad summarize

@reviewpad
Copy link
Contributor

reviewpad bot commented May 12, 2023

AI-Generated Summary: This pull request includes 3 patches:

  1. Adds a simple CLI to the project, which takes input for base directory, output directory, and a list of OpenAPI or YAML specifications. It also modifies package.json, tsconfig.build.json, and yarn.lock to accommodate the changes.
  2. Removes Travis CI related files and mentions from the repository. This includes deleting .travis.yml and updating the README.md file.
  3. Adds publishing scripts to automate the process of publishing through GitHub Actions. It also updates the documentation to include a guide for manual publishing.

src/cli/index.ts Show resolved Hide resolved
src/cli/index.ts Show resolved Hide resolved
src/cli/index.ts Outdated
.usage('swagger-codegen-ts -o <output_path> [flags] <path/to/spec.yaml>...')
.option('baseDir', {
alias: 'b',
describe: 'base directory for <specs> and <outDir> paths',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it really "outDir" or "baseDir", maybe a typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's correct if I understand you correctly
outDir is relative to baseDir

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After thinking a bit more on this, probably making outDir relative to the baseDir does not make much sense.
In the new commit this will be like this:

  • outDir is relative to the cwd (unless an absolute path is given);
  • each spec is relative to baseDir if it is provided, otherwise relative to the cwd

@reviewpad
Copy link
Contributor

reviewpad bot commented May 16, 2023

AI-Generated Summary: This pull request includes several changes:

  1. Removed .travis.yml file and updated .npmignore.

  2. Updated and enhanced README.md with instructions on CLI usage.

  3. Updated the documentation in /docs/development/overview.md and modified the publish process.

  4. Added new dependencies and updated the package.json file.

  5. Added a new file src/cli/index.ts for detecting codecs and processing options.

  6. Updated tsconfig.build.json to include the new src/cli/index.ts file.

  7. Added new dependencies and updated versions in yarn.lock.

Overall, this PR focuses on improving the usability of the package by adding CLI usage instructions and updating the build configuration.

@reviewpad
Copy link
Contributor

reviewpad bot commented May 16, 2023

AI-Generated Summary: This pull request includes changes related to updating the code generation tool and its documentation. It removes the Travis CI configuration, updates the README, adds a new CLI support, and makes several minor adjustments in package.json, tsconfig.json, and other files. The changes result in better CLI usage and the addition of the swagger-codegen-ts binary in package.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium Pull request is medium waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

please add a cli
3 participants