Skip to content

Commit

Permalink
Renamed Spec to OpenAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
EwenQuim committed Dec 12, 2024
1 parent d4f1294 commit 0c474a1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@ type OpenAPIzer interface {
GlobalOpenAPIResponses() *[]openAPIError
}

func NewSpec() *Spec {
func NewSpec() *OpenAPI {
desc := NewOpenApiSpec()
return &Spec{
return &OpenAPI{
description: &desc,
generator: openapi3gen.NewGenerator(),
globalOpenAPIResponses: &[]openAPIError{},
}
}

// Holds the OpenAPI OpenAPIDescription (OAD) and OpenAPI capabilities.
type Spec struct {
type OpenAPI struct {
description *openapi3.T
generator *openapi3gen.Generator
globalOpenAPIResponses *[]openAPIError
}

func (d *Spec) OpenAPIDescription() *openapi3.T {
func (d *OpenAPI) OpenAPIDescription() *openapi3.T {
return d.description
}

func (d *Spec) Generator() *openapi3gen.Generator {
func (d *OpenAPI) Generator() *openapi3gen.Generator {
return d.generator
}

func (d *Spec) GlobalOpenAPIResponses() *[]openAPIError {
func (d *OpenAPI) GlobalOpenAPIResponses() *[]openAPIError {
return d.globalOpenAPIResponses
}

var _ OpenAPIzer = &Spec{}
var _ OpenAPIzer = &OpenAPI{}

func NewOpenApiSpec() openapi3.T {
info := &openapi3.Info{
Expand Down

0 comments on commit 0c474a1

Please sign in to comment.