@@ -57,17 +57,14 @@ const (
5757 FormatFilePath Format = "file_path"
5858)
5959
60- // UserInput represents a user input as defined in the spec
6160type Input struct {
62- Description string `json:"description,omitempty" bson:"description,omitempty"`
63- IsRequired bool `json:"is_required,omitempty" bson:"is_required,omitempty"`
64- Format Format `json:"format,omitempty" bson:"format,omitempty"`
65- Value string `json:"value,omitempty" bson:"value,omitempty"`
66- IsSecret bool `json:"is_secret,omitempty" bson:"is_secret,omitempty"`
67- Default string `json:"default,omitempty" bson:"default,omitempty"`
68- Choices []string `json:"choices,omitempty" bson:"choices,omitempty"`
69- Template string `json:"template,omitempty" bson:"template,omitempty"`
70- Properties map [string ]Input `json:"properties,omitempty" bson:"properties,omitempty"`
61+ Description string `json:"description,omitempty" bson:"description,omitempty"`
62+ IsRequired bool `json:"is_required,omitempty" bson:"is_required,omitempty"`
63+ Format Format `json:"format,omitempty" bson:"format,omitempty"`
64+ Value string `json:"value,omitempty" bson:"value,omitempty"`
65+ IsSecret bool `json:"is_secret,omitempty" bson:"is_secret,omitempty"`
66+ Default string `json:"default,omitempty" bson:"default,omitempty"`
67+ Choices []string `json:"choices,omitempty" bson:"choices,omitempty"`
7168}
7269
7370type InputWithVariables struct {
@@ -107,25 +104,25 @@ type Package struct {
107104
108105// Remote represents a remote connection endpoint
109106type Remote struct {
110- TransportType string `json:"transport_type" bson:"transport_type"`
111- URL string `json:"url" bson:"url"`
112- Headers []Input `json:"headers,omitempty" bson:"headers,omitempty"`
107+ TransportType string `json:"transport_type" bson:"transport_type"`
108+ URL string `json:"url" bson:"url"`
109+ Headers []KeyValueInput `json:"headers,omitempty" bson:"headers,omitempty"`
113110}
114111
115112// VersionDetail represents the version details of a server
116113type VersionDetail struct {
117114 Version string `json:"version" bson:"version"`
118- ReleaseDate string `json:"release_date" bson:"release_date"`
119- IsLatest bool `json:"is_latest" bson:"is_latest"`
115+ ReleaseDate string `json:"release_date,omitempty " bson:"release_date"`
116+ IsLatest bool `json:"is_latest,omitempty " bson:"is_latest"`
120117}
121118
122119// Server represents a basic server information as defined in the spec
123120type Server struct {
124- ID string `json:"id" bson:"id"`
121+ ID string `json:"id,omitempty " bson:"id"`
125122 Name string `json:"name" bson:"name"`
126123 Description string `json:"description" bson:"description"`
127124 Status ServerStatus `json:"status,omitempty" bson:"status,omitempty"`
128- Repository Repository `json:"repository" bson:"repository"`
125+ Repository Repository `json:"repository,omitempty " bson:"repository"`
129126 VersionDetail VersionDetail `json:"version_detail" bson:"version_detail"`
130127}
131128
0 commit comments