requestSchemas

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

This package provides a standardized approach to handling request schemas

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Schema

type Schema struct {
	RequestSchema struct {
		SchemaVersion string `yaml:"schemaVersion"`
		Categories    []struct {
			Name        string `yaml:"name"`
			Description string `yaml:"description"`
			Actions     []struct {
				Name               string   `yaml:"name"`
				Body               bool     `yaml:"body"`
				Method             string   `yaml:"method"`
				Description        string   `yaml:"description"`
				Parameters         []string `yaml:"parameters"`
				OptionalParameters []string `yaml:"optionalParameters"`
				Roles              []string `yaml:"roles"`
			} `yaml:"actions"`
		} `yaml:"categories"`
	} `yaml:"requestSchema"`
}

Struct to which the request schema configuration files should follow

func (*Schema) GetSchema

func (schema *Schema) GetSchema(requestSchemaData []byte) *Schema

GetSchema unmarshals the request schema data and returns a Schema struct

Jump to

Keyboard shortcuts

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