From c99d552d9edec96bebb97e9147abf9050d71e2e0 Mon Sep 17 00:00:00 2001 From: Federico Bevione Date: Wed, 21 Jun 2023 19:09:53 +0200 Subject: [PATCH] remove unused fields --- index/index_model.go | 9 --------- index/utility_methods.go | 5 +++-- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/index/index_model.go b/index/index_model.go index 4a859dd..78e6d6f 100644 --- a/index/index_model.go +++ b/index/index_model.go @@ -166,14 +166,8 @@ type SpecIndex struct { operationTagsCount int // number of unique tags in operations globalTagsCount int // number of global tags defined totalTagsCount int // number unique tags in spec - securitySchemesCount int // security schemes - globalRequestBodiesCount int // component request bodies - globalResponsesCount int // component responses - globalHeadersCount int // component headers - globalExamplesCount int // component examples globalLinksCount int // component links globalCallbacksCount int // component callbacks - globalCallbacks int // component callbacks. pathCount int // number of paths operationCount int // number of operations operationParamCount int // number of params defined in operations @@ -185,9 +179,7 @@ type SpecIndex struct { root *yaml.Node // the root document pathsNode *yaml.Node // paths node tagsNode *yaml.Node // tags node - componentsNode *yaml.Node // components node parametersNode *yaml.Node // components/parameters node - allParametersNode map[string]*Reference // all parameters node allParameters map[string]*Reference // all parameters (components/defs) schemasNode *yaml.Node // components/schemas node allInlineSchemaDefinitions []*Reference // all schemas found in document outside of components (openapi) or definitions (swagger). @@ -207,7 +199,6 @@ type SpecIndex struct { allLinks map[string]*Reference // all links callbacksNode *yaml.Node // components/callbacks node allCallbacks map[string]*Reference // all components examples - externalDocumentsNode *yaml.Node // external documents node allExternalDocuments map[string]*Reference // all external documents externalSpecIndex map[string]*SpecIndex // create a primary index of all external specs and componentIds refErrors []error // errors when indexing references diff --git a/index/utility_methods.go b/index/utility_methods.go index 41a08df..8803872 100644 --- a/index/utility_methods.go +++ b/index/utility_methods.go @@ -5,11 +5,12 @@ package index import ( "fmt" - "github.com/pb33f/libopenapi/utils" - "gopkg.in/yaml.v3" "net/url" "strings" "sync" + + "github.com/pb33f/libopenapi/utils" + "gopkg.in/yaml.v3" ) func (index *SpecIndex) extractDefinitionsAndSchemas(schemasNode *yaml.Node, pathPrefix string) {