pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

🎁 [Feature Request]: Add `--version` command to get pulsar version

Open ImmaZoni opened this issue 2 years ago • 1 comments

What is the feature you would like to see?

This PR adds the --version command to Pulsar, allowing users to quickly retrieve the current version directly from the command line.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ImmaZoni avatar Sep 19 '23 20:09 ImmaZoni

got it, I see the point.

that's why there are some comments, so that you can just find their start/end index and remove what's in between comments like

  • // <EndpointByMethod> and // </EndpointByMethod>
  • // <EndpointByMethod.Shorthands> and // </EndpointByMethod.Shorthands>
  • // <ApiClientTypes> and // </ApiClientTypes>
  • // <ApiClient> and // </ApiClient>

so, for example, if you just want to keep the schemas + endpoint definitions, you can do something like:

const schemasOnlyFile = generated.slice(0, generated.indexOf("// <EndpointByMethod>"))

also, if you just want the schemas with a runtime, without even the endpoints definitions, you should directly use the tool that is used internally: https://github.com/sinclairzx81/typebox-codegen see the live online demo here https://sinclairzx81.github.io/typebox-workbench/

astahmer avatar Aug 28 '23 12:08 astahmer

The comments are usefull. But it would be great if the generated code wouldn't need any altering.

Is it possible to add an option to skip the APIClient and/OR Endpoints?

The difference with typebox-codegen seems like that's only typescript -> runtime.. Instead of OpenAPI -> runtime, like this great library.

the-ult avatar Jan 24 '24 10:01 the-ult

feel free to send a PR that adds an option / CLI flag for that

astahmer avatar Jan 24 '24 10:01 astahmer

I'll see/hope to make some time in the near future and see if I can contribute. (bit to busy atm I'm afraid)

the-ult avatar Jan 24 '24 10:01 the-ult