package
0.7.0
Repository: https://github.com/google/gnostic.git
Documentation: pkg.go.dev

# README

Plugins

This directory contains support code for building Gnostic plugins and associated examples.

Plugins are used to process API descriptions and can perform tasks like documentation and code generation. Plugins can be written in any language that is supported by the Protocol Buffer tools.

This directory contains several sample plugins and two support tools that make it easier to test plugins by running them standalone.

  • gnostic-plugin-request is a plugin that captures a plugin request and writes it in .json and binary .pb form. When the optional -verbose flag is provided, this plugin logs the request to stdout.
  • gnostic-process-plugin-response is a standalone tool that reads a plugin response on stdin and handles the response in the same way that gnostic does.

For example, this writes the plugin request to local files plugin-request.json and plugin-request.pb.

% gnostic myapi.json --plugin-request-out=.

Then a plugin can be run standalone:

% gnostic-go-generator --plugin < plugin-request.pb > plugin-response.pb

Then you can use the following to process the plugin response:

% gnostic-process-plugin-response -output=. < plugin-response.pb

# Packages

gnostic_analyze is a tool for analyzing OpenAPI descriptions.
gnostic-complexity is a plugin that generates a complexity summary of an API.
Copyright 2020 Google LLC.
gnostic-plugin-request is a development tool that captures and optionally displays the contents of the gnostic plugin interface.
gnostic-process-plugin-response is a development tool that processes the output of a gnostic plugin in the same way that it would be handled by gnostic itself.
gnostic_go_generator is a sample Gnostic plugin that generates Go code that supports an API.
Copyright 2020 Google LLC.

# Functions

No description provided by the author
NewEnvironment creates a plugin context from arguments and standard input.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
Enum value maps for Message_Level.
Enum value maps for Message_Level.

# Structs

Environment contains the environment of a plugin call.
File describes a file generated by a plugin.
Plugins can return messages to be collated and reported by gnostic.
No description provided by the author
A parameter passed to the plugin from (or through) gnostic.
An encoded Request is written to the plugin's stdin.
The plugin writes an encoded Response to stdout.
The version number of gnostic.

# Type aliases

No description provided by the author