saloon-sdk-generator
saloon-sdk-generator copied to clipboard
composer generate:stripe not working (composer commands are as well as sdkgenerator generate:sdk
I added global require for sdk generator (i am using Laravel Herd if it makes a difference) but composer generate:stripe does t work
doesn´t work
is always the best and most detailed way to describe a problem 👏
Hi @craigvc! 👋
Thanks for reaching out! I think there might be a bit of confusion here about the different commands available.
The composer generate:stripe command is a development script that only works within the SDK generator's own repository for testing purposes. When you install the SDK generator globally, you'll want to use the sdkgenerator CLI command instead.
Here's how to generate a Stripe SDK using the global installation:
# First, make sure you have the latest version
composer global update crescat-io/saloon-sdk-generator
# For OpenAPI/Swagger format (preferred):
sdkgenerator generate:sdk path/to/stripe-openapi.yaml --type=openapi --name=Stripe --output=./src/Stripe --namespace=App\\Stripe
# For Postman Collection format:
sdkgenerator generate:sdk path/to/stripe-postman.json --type=postman --name=Stripe --output=./src/Stripe --namespace=App\\Stripe
Both formats work great, but OpenAPI is preferred as it typically provides more complete type information.
You'll need to provide your own Stripe API specification file. You can find Stripe's official OpenAPI spec here: https://github.com/stripe/openapi
The latest version is v1.3.1 which includes several fixes and improvements. If you're still experiencing issues with the latest version, please feel free to reopen this issue with:
- The exact command you're running
- The version you're using (
sdkgenerator --version) - Any error messages you're seeing
Hope this helps! Let me know if you need any clarification. 🙌
Closing this issue as it appears to be a command usage confusion. The documentation above should help clarify the correct usage. Please feel free to reopen if you're still having trouble!