github.com/kyma-incubator/compass/components/director@v0.0.0-20230623144113-d764f56ff805/pkg/graphql/api.go (about) 1 package graphql 2 3 import "github.com/kyma-incubator/compass/components/director/pkg/resource" 4 5 // APIDefinition missing godoc 6 type APIDefinition struct { 7 BundleID string `json:"bundleID"` 8 Name string `json:"name"` 9 Description *string `json:"description"` 10 Spec *APISpec `json:"spec"` 11 TargetURL string `json:"targetURL"` 12 // group allows you to find the same API but in different version 13 Group *string `json:"group"` 14 Version *Version `json:"version"` 15 *BaseEntity 16 } 17 18 // GetType missing godoc 19 func (e *APIDefinition) GetType() resource.Type { 20 return resource.API 21 } 22 23 // APISpec missing godoc 24 type APISpec struct { 25 // when fetch request specified, data will be automatically populated 26 ID string `json:"id"` 27 Data *CLOB `json:"data"` 28 Format SpecFormat `json:"format"` 29 Type APISpecType `json:"type"` 30 DefinitionID string // Needed to resolve FetchRequest for given APISpec 31 } 32 33 // APIDefinitionPageExt is an extended type used by external API 34 type APIDefinitionPageExt struct { 35 APIDefinitionPage 36 Data []*APIDefinitionExt `json:"data"` 37 } 38 39 // APIDefinitionExt missing godoc 40 type APIDefinitionExt struct { 41 APIDefinition 42 Spec *APISpecExt `json:"spec"` 43 } 44 45 // APISpecExt missing godoc 46 type APISpecExt struct { 47 APISpec 48 FetchRequest *FetchRequest `json:"fetchRequest"` 49 }