schema

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BaseTemplate = `
context: {
  name: string
  config?: [...{
    name: string
    value: string
  }]
  ...
}
`

BaseTemplate include base info provided by KubeVela for CUE template

View Source
const ErrGenerateOpenAPIV2JSONSchemaForCapability = "cannot generate OpenAPI v3 JSON schema for capability %s: %v"

ErrGenerateOpenAPIV2JSONSchemaForCapability is the error while generating OpenAPI v3 schema

Variables

This section is empty.

Functions

func ConvertOpenAPISchema2SwaggerObject

func ConvertOpenAPISchema2SwaggerObject(data []byte) (*openapi3.Schema, error)

ConvertOpenAPISchema2SwaggerObject converts OpenAPI v2 JSON schema to Swagger Object

func FixOpenAPISchema

func FixOpenAPISchema(name string, schema *openapi3.Schema)

FixOpenAPISchema fixes tainted `description` filed, missing of title `field`.

func ParsePropertiesToSchema

func ParsePropertiesToSchema(ctx context.Context, s string, templateFieldPath ...string) (*openapi3.Schema, error)

ParsePropertiesToSchema parse the properties in cue script to the openapi schema

Types

This section is empty.

Jump to

Keyboard shortcuts

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