From 781c0dec27c92355d95341cde79ce55e50007bbb Mon Sep 17 00:00:00 2001 From: Charles Treatman Date: Thu, 8 Jan 2026 13:56:08 -0600 Subject: [PATCH] chore(docs): move development docs out of readme --- DEVELOPMENT.md | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 47 ----------------------------------- 2 files changed, 67 insertions(+), 47 deletions(-) create mode 100644 DEVELOPMENT.md diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md new file mode 100644 index 0000000..17d026d --- /dev/null +++ b/DEVELOPMENT.md @@ -0,0 +1,67 @@ +# Development + +## Dynamic Command Registration + +The CLI uses reflection to automatically register commands from the Equinix SDK. This approach: + +- **Automatically discovers** all API services in the SDK client +- **Generates commands** for each service and method at build time +- **Reduces maintenance** - new SDK services are automatically available +- **Ensures consistency** - command structure mirrors the SDK structure + +## Adding one New Service + +To onboard a single new Equinix service (e.g., fabricv5), use the `onboard` target: + +```sh +make onboard SERVICE=fabricv5 +``` + +This will scaffold: +- `cmd/.go` - Command registration +- `internal/api/.go` - API client setup +- `cmd/descriptions/.json` - Field descriptions to embed for help + +After scaffolding, you'll need to: +1. Review and adjust the generated files +2. Ensure the SDK package exists in `github.com/equinix/equinix-sdk-go/services/` +3. Run `make build` to verify the integration + +## Adding all services defined in equinix-sdk-go + +To onboard/update every service defined in equinix-sdk-go, use the `generate-all` target: + +```sh +make generate-all +``` + +After generating, you'll need to: +1. Review and adjust the generated files +2. Run `make build` to verify the integration + +## Building + +```sh +make build +``` + +## Linting + +```sh +make lint +``` + + +## Fixing linter issues + +```sh +make fix +``` + +**NOTE:** Some linter issues may require hands-on work to address. Where possible, the make task abov will automatically address linter issues in generated code. It's a good idea to carefully review lint issues first to see if any of them can be fixed proactively with changes to template files, etc.. + +## Generating Documentation + +```sh +make docs +``` diff --git a/README.md b/README.md index 1664822..c6b3595 100644 --- a/README.md +++ b/README.md @@ -24,50 +24,3 @@ brew install equinix ## Usage The full CLI documentation can be found [in the docs directory](docs/equinix.md). - -### Dynamic Command Registration - -The CLI uses reflection to automatically register commands from the Equinix SDK. This approach: - -- **Automatically discovers** all API services in the SDK client -- **Generates commands** for each service and method at build time -- **Reduces maintenance** - new SDK services are automatically available -- **Ensures consistency** - command structure mirrors the SDK structure - -## Development - -### Adding New Services - -To onboard a new Equinix service (e.g., fabricv5), use the `onboard` target: - -```sh -make onboard SERVICE=fabricv5 -``` - -This will scaffold: -- `cmd/.go` - Command registration -- `internal/api/.go` - API client setup -- `cmd/descriptions/.json` - Field descriptions to embed for help - -After scaffolding, you'll need to: -1. Review and adjust the generated files -2. Ensure the SDK package exists in `github.com/equinix/equinix-sdk-go/services/` -3. Run `make build` to verify the integration - -### Building - -```sh -make build -``` - -### Linting - -```sh -make lint -``` - -### Generating Documentation - -```sh -make docs -```