apigen

module
v0.0.0-...-2828e0a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2022 License: Apache-2.0

README

RHOAS API Generator Tool

Internal tools for generating API clients

Fetch OpenAPI file

Install:

go get -u github.com/redhat-developer/app-services-sdk-go/internal/apigen/cmd/api-fetch@latest

Usage:

api-fetch --download-url="https://raw.githubusercontent.com/bf2fc6cc711aee1a0c2a/kas-fleet-manager/main/openapi/kas-fleet-manager.yaml" --token="$GITHUB_ACCESS_TOKEN"
Generate API client

Install:

go get -u github.com/redhat-developer/app-services-sdk-go/internal/apigen/cmd/api-generate@latest

Usage:

api-generate --client-id="kafka-mgmt/v1" --generator=go --templates-dir="./scripts/templates" --repo-metadata ".config/api-client-metadata.json"
Generate all API clients

Install:

go get -u github.com/redhat-developer/app-services-sdk-go/internal/apigen/cmd/api-generate-all@latest

Usage:

api-generate-all --repo-metadata=.config/api-client-metadata.json --generator go --templates-dir=./scripts/templates
Local development

Execute command to install all versions of the commandline directly from source code.

make install

Directories

Path Synopsis
cmd
api-create-pr command
api-fetch command
api-generate command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL