This is the multi-page printable view of this section.
Click here to print.
Return to the regular view of this page.
generate
Generate mock configurations
skyramp mocker generate
Options
--alias string Kubernetes service / Docker alias name
--api-schema string path to API schema file, or URL (URL support for OpenAPI 3.x only)
-g, --glyphs string Specify the glyph combination to use: "1,2,3" - 1.Chinese 2.Cedilla 3.Emoji 4.Korean 5.German 6.French 7.Spanish 8.Russian 9.Control Char
--language string specify output language for Skyramp library code generation. Accepted values: "python" (default "YAML")
--openai (experimental) use OpenAI to generate mock values (the 'OPENAI_API_KEY' environment variable must be set with an OpenAI API token)
--openai-context string (experimental) Optional, extra context to give OpenAI to augment the mock values
--openai-model string (experimental) Optional, GPT model to use for OpenAI (one of [gpt-3.5-turbo gpt-4]). Note that some models may not accessible based on the API token (default "gpt-3.5-turbo")
--port int port number for the service
--sample-response string path to API sample response file
Options inherited from parent commands
--kube-insecure enable insecure mode for interactions with Kubernetes clusters
-p, --project-path string path to Skyramp project folder (default ".")
-v, --verbose count verbose (-v or -vv)
SEE ALSO
- mocker - Manage mocks
- grpc - Generate mock configurations for gRPC protocol
- jsonrpc-http - Generate mock configurations for JSON-RPC over HTTP protocol
- jsonrpc-ws - Generate mock configurations for JSON-RPC over Websocket protocol
- rest - Generate mock configurations for REST protocol
- rest-protobuf - Generate mock configurations for REST protocol using protobuf

1 - grpc
Generate mock configurations for gRPC protocol
skyramp mocker generate grpc
skyramp mocker generate grpc [flags]
Examples
skyramp mocker generate grpc --api-schema path/to/schema.proto --alias my-service --port 8080 --service ProductService
Options
--service string proto service to utilize
Options inherited from parent commands
--alias string Kubernetes service / Docker alias name
--api-schema string path to API schema file, or URL (URL support for OpenAPI 3.x only)
-g, --glyphs string Specify the glyph combination to use: "1,2,3" - 1.Chinese 2.Cedilla 3.Emoji 4.Korean 5.German 6.French 7.Spanish 8.Russian 9.Control Char
--kube-insecure enable insecure mode for interactions with Kubernetes clusters
--language string specify output language for Skyramp library code generation. Accepted values: "python" (default "YAML")
--openai (experimental) use OpenAI to generate mock values (the 'OPENAI_API_KEY' environment variable must be set with an OpenAI API token)
--openai-context string (experimental) Optional, extra context to give OpenAI to augment the mock values
--openai-model string (experimental) Optional, GPT model to use for OpenAI (one of [gpt-3.5-turbo gpt-4]). Note that some models may not accessible based on the API token (default "gpt-3.5-turbo")
--port int port number for the service
-p, --project-path string path to Skyramp project folder (default ".")
--sample-response string path to API sample response file
-v, --verbose count verbose (-v or -vv)
SEE ALSO
2 - jsonrpc-http
Generate mock configurations for JSON-RPC over HTTP protocol
skyramp mocker generate jsonrpc-http
skyramp mocker generate jsonrpc-http [flags]
Examples
skyramp mocker generate jsonrpc-http --sample-response path/to/sample-response.json --alias my-service --port 8080 --endpoint-path /api/v1 --method calculateSum
Options
--endpoint-path string the REST path that upgrades http to a websocket
--method string json-rpc method to utilize
Options inherited from parent commands
--alias string Kubernetes service / Docker alias name
--api-schema string path to API schema file, or URL (URL support for OpenAPI 3.x only)
-g, --glyphs string Specify the glyph combination to use: "1,2,3" - 1.Chinese 2.Cedilla 3.Emoji 4.Korean 5.German 6.French 7.Spanish 8.Russian 9.Control Char
--kube-insecure enable insecure mode for interactions with Kubernetes clusters
--language string specify output language for Skyramp library code generation. Accepted values: "python" (default "YAML")
--openai (experimental) use OpenAI to generate mock values (the 'OPENAI_API_KEY' environment variable must be set with an OpenAI API token)
--openai-context string (experimental) Optional, extra context to give OpenAI to augment the mock values
--openai-model string (experimental) Optional, GPT model to use for OpenAI (one of [gpt-3.5-turbo gpt-4]). Note that some models may not accessible based on the API token (default "gpt-3.5-turbo")
--port int port number for the service
-p, --project-path string path to Skyramp project folder (default ".")
--sample-response string path to API sample response file
-v, --verbose count verbose (-v or -vv)
SEE ALSO
3 - jsonrpc-ws
Generate mock configurations for JSON-RPC over Websocket protocol
skyramp mocker generate jsonrpc-ws
skyramp mocker generate jsonrpc-ws [flags]
Examples
skyramp mocker generate jsonrpc-ws --sample-response path/to/sample-response.json --alias my-service --port 8080 --endpoint-path /api/v1 --method calculateSum
Options
--endpoint-path string the REST path that upgrades http to a websocket
--method string json-rpc method to utilize
Options inherited from parent commands
--alias string Kubernetes service / Docker alias name
--api-schema string path to API schema file, or URL (URL support for OpenAPI 3.x only)
-g, --glyphs string Specify the glyph combination to use: "1,2,3" - 1.Chinese 2.Cedilla 3.Emoji 4.Korean 5.German 6.French 7.Spanish 8.Russian 9.Control Char
--kube-insecure enable insecure mode for interactions with Kubernetes clusters
--language string specify output language for Skyramp library code generation. Accepted values: "python" (default "YAML")
--openai (experimental) use OpenAI to generate mock values (the 'OPENAI_API_KEY' environment variable must be set with an OpenAI API token)
--openai-context string (experimental) Optional, extra context to give OpenAI to augment the mock values
--openai-model string (experimental) Optional, GPT model to use for OpenAI (one of [gpt-3.5-turbo gpt-4]). Note that some models may not accessible based on the API token (default "gpt-3.5-turbo")
--port int port number for the service
-p, --project-path string path to Skyramp project folder (default ".")
--sample-response string path to API sample response file
-v, --verbose count verbose (-v or -vv)
SEE ALSO
4 - rest
Generate mock configurations for REST protocol
skyramp mocker generate rest
skyramp mocker generate rest [flags]
Examples
skyramp mocker generate rest --api-schema https://example.com/api/v1/openapi.yaml --alias my-service --port 8080 --tag users --paths /api/v1/users
skyramp mocker generate rest --sample-response path/to/sample-response.json --alias my-service --port 8080 --endpoint-path /api/v1
Options
--endpoint-path string the REST path that upgrades http to a websocket
--path strings REST path to filter on. Can be used multiple times to filter on multiple paths.
--paths string comma-separated list of REST paths to filter on (to be deprecated: use --path instead)
--tag string OpenAPI tag to filter on
Options inherited from parent commands
--alias string Kubernetes service / Docker alias name
--api-schema string path to API schema file, or URL (URL support for OpenAPI 3.x only)
-g, --glyphs string Specify the glyph combination to use: "1,2,3" - 1.Chinese 2.Cedilla 3.Emoji 4.Korean 5.German 6.French 7.Spanish 8.Russian 9.Control Char
--kube-insecure enable insecure mode for interactions with Kubernetes clusters
--language string specify output language for Skyramp library code generation. Accepted values: "python" (default "YAML")
--openai (experimental) use OpenAI to generate mock values (the 'OPENAI_API_KEY' environment variable must be set with an OpenAI API token)
--openai-context string (experimental) Optional, extra context to give OpenAI to augment the mock values
--openai-model string (experimental) Optional, GPT model to use for OpenAI (one of [gpt-3.5-turbo gpt-4]). Note that some models may not accessible based on the API token (default "gpt-3.5-turbo")
--port int port number for the service
-p, --project-path string path to Skyramp project folder (default ".")
--sample-response string path to API sample response file
-v, --verbose count verbose (-v or -vv)
SEE ALSO
5 - rest-protobuf
Generate mock configurations for REST protocol using protobuf
skyramp mocker generate rest-protobuf
skyramp mocker generate rest-protobuf [flags]
Options
--api-schemas strings paths to API schema file
--proto-path string proto_path to use for parsing multiple protobuf files
--protobuf-any stringToString map of the location of a protobuf any type to the value to the type to replace the type (default [])
--service string proto service to utilize
Options inherited from parent commands
--alias string Kubernetes service / Docker alias name
--api-schema string path to API schema file, or URL (URL support for OpenAPI 3.x only)
-g, --glyphs string Specify the glyph combination to use: "1,2,3" - 1.Chinese 2.Cedilla 3.Emoji 4.Korean 5.German 6.French 7.Spanish 8.Russian 9.Control Char
--kube-insecure enable insecure mode for interactions with Kubernetes clusters
--language string specify output language for Skyramp library code generation. Accepted values: "python" (default "YAML")
--openai (experimental) use OpenAI to generate mock values (the 'OPENAI_API_KEY' environment variable must be set with an OpenAI API token)
--openai-context string (experimental) Optional, extra context to give OpenAI to augment the mock values
--openai-model string (experimental) Optional, GPT model to use for OpenAI (one of [gpt-3.5-turbo gpt-4]). Note that some models may not accessible based on the API token (default "gpt-3.5-turbo")
--port int port number for the service
-p, --project-path string path to Skyramp project folder (default ".")
--sample-response string path to API sample response file
-v, --verbose count verbose (-v or -vv)
SEE ALSO