custom_plugin

package
v0.0.0-...-7e551b2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

Custom Plugin Example

This plugin detects if any operation in the OpenAPI spec has an extension named "x-visibility" with the following structure

{
  "x-visibility": {
    "extent": "INTERNAL"
  }
}

If operation is tagged as internal, it's removed from the spec model before it's passed down to the rest of the generator pipeline.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
}

Plugin Custom plugin for handling "x-visibility" OpenAPI extension

func (*Plugin) ProcessOAS2SpecModel

func (p *Plugin) ProcessOAS2SpecModel(specModel *libopenapi.DocumentModel[v2high.Swagger]) error

func (*Plugin) ProcessOAS3SpecModel

func (p *Plugin) ProcessOAS3SpecModel(specModel *libopenapi.DocumentModel[v3high.Document]) error

func (*Plugin) ProcessProxyModel

func (p *Plugin) ProcessProxyModel(apiProxy *v1.APIProxy) error

type Visibility

type Visibility struct {
	Extent string
}

Jump to

Keyboard shortcuts

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