nasa9084 / go-openapi

OpenAPI Specification (OAS) 3.0 implementation for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAPI Specification object model

GoDoc Build Status codecov


This package is still under development, so the API will be changed without any notification

Overview

This is an implementation of OpenAPI Specification 3.0 object model with some usable functions.

Synopsis

package main

import (
    "fmt"

    "github.com/nasa9084/go-openapi"
)

func main() {
    doc, _ := openapi.LoadFile("path/to/spec")
    fmt.Print(doc.Version)
}

Status

  • Model definition
  • Load OpenAPI 3.0 spec file
  • Resolve Reference object
    • Resolve #/component reference
    • Resolve other file reference
  • Validation
    • Validate spec values
      • test for validation
        • Document
        • Info
        • Contact
        • License
        • Server
        • ServerVariable
        • Paths
        • PathItem
        • Operation
        • Parameter
        • RequestBody
        • Responses
        • Response
        • Callbacks
        • Callback
        • Schema
        • Example
        • MediaType
        • Header
        • Link
        • Encoding
        • Discriminator
        • XML
        • Components
        • SecurityScheme
        • OAuthFlows
        • OAuthFlow
        • SecurityRequirement
        • Tag
        • ExternalDocumentation
    • Validate HTTP Request
    • Validate HTTP Response

About

OpenAPI Specification (OAS) 3.0 implementation for Go

License:MIT License


Languages

Language:Go 100.0%