apigateway2openapi

package module
v0.0.0-...-4d4a03f Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Convert apigateway documentation parts to OpenAPI valid specification

Code lines Comments

Supported Documentation parts

  • API
  • METHOD
  • MODEL
  • REQUEST_BODY
  • RESOURCE
  • RESPONSE

Example

go run . API-staging-oas30-apigateway.json

Roadmap

Feature/Improvement Description Status
Support PATH_PARAMETER - Not Started
Support QUERY_PARAMETER - Not Started
Remove getBytes method This is a temp hack Not Started
Don't set summary using options This is a temp hack Not Started

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(path string) ([]byte, error)

Types

type AmazonApigatewayDocumentation

type AmazonApigatewayDocumentation struct {
	Version            string
	DocumentationParts []DocumentationPart `json:"documentationParts"`
}

type DocumentationPart

type DocumentationPart struct {
	Location   Location
	Properties json.RawMessage
}

type Example

type Example struct {
	Value string `json:"value"`
}

type Location

type Location struct {
	Type       string
	Path       string
	Method     string
	Name       string
	StatusCode string `json:"statusCode"`
}

type Method

type Method struct {
	Description string `json:"description"`
	Summary     string `json:"summary"`
}

type OpenapiGateway

type OpenapiGateway struct {
	AmazonApigatewayDocumentation AmazonApigatewayDocumentation `json:"x-amazon-apigateway-documentation"`
}

type RequestBody

type RequestBody struct {
	Content     string `json:"content"`
	Description string `json:"description"`
}

type Response

type Response struct {
	Description      string                        `json:"description"`
	ResponseExamples map[string]map[string]Example `json:"responseExamples"`
	ResponseModels   map[string]string             `json:"responseModels"`
}

type SpecHandler

type SpecHandler struct {
	// contains filtered or unexported fields
}

func NewSpecHandler

func NewSpecHandler(path string) (SpecHandler, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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