From b417456c6b86b2e7ea34cad802b2704f3719c544 Mon Sep 17 00:00:00 2001 From: Hayden Blauzvern Date: Thu, 21 Jul 2022 18:18:20 +0000 Subject: [PATCH 1/3] Drop application/yaml content type This is a breaking change for any clients that are currently requesting application/yaml. This is the simplest fix to #593, as openapi randomly switches between json and yaml responses when no content type is provided. Fixes #593 Signed-off-by: Hayden Blauzvern --- openapi.yaml | 4 +- pkg/client/rekor_client.go | 4 +- pkg/client/yaml.go | 46 ------------------- .../entries/create_log_entry_parameters.go | 8 ++-- .../entries/create_log_entry_responses.go | 12 +++-- .../client/entries/entries_client.go | 29 ++++++------ .../get_log_entry_by_index_parameters.go | 8 ++-- .../get_log_entry_by_index_responses.go | 9 ++-- .../get_log_entry_by_uuid_parameters.go | 8 ++-- .../get_log_entry_by_uuid_responses.go | 9 ++-- .../entries/search_log_query_parameters.go | 8 ++-- .../entries/search_log_query_responses.go | 9 ++-- pkg/generated/client/index/index_client.go | 6 +-- .../client/index/search_index_parameters.go | 8 ++-- .../client/index/search_index_responses.go | 9 ++-- .../pubkey/get_public_key_parameters.go | 8 ++-- .../client/pubkey/get_public_key_responses.go | 6 ++- pkg/generated/client/pubkey/pubkey_client.go | 6 +-- .../server/get_rekor_version_parameters.go | 8 ++-- .../server/get_rekor_version_responses.go | 6 ++- pkg/generated/client/server/server_client.go | 6 +-- .../client/tlog/get_log_info_parameters.go | 8 ++-- .../client/tlog/get_log_info_responses.go | 6 ++- .../client/tlog/get_log_proof_parameters.go | 8 ++-- .../client/tlog/get_log_proof_responses.go | 9 ++-- pkg/generated/client/tlog/tlog_client.go | 16 +++---- pkg/generated/models/alpine_schema.go | 2 +- pkg/generated/models/alpine_v001_schema.go | 2 +- pkg/generated/models/cose_schema.go | 2 +- pkg/generated/models/cose_v001_schema.go | 2 +- pkg/generated/models/hashedrekord_schema.go | 2 +- .../models/hashedrekord_v001_schema.go | 2 +- pkg/generated/models/helm_schema.go | 2 +- pkg/generated/models/helm_v001_schema.go | 2 +- pkg/generated/models/intoto_schema.go | 2 +- pkg/generated/models/intoto_v001_schema.go | 2 +- pkg/generated/models/jar_schema.go | 2 +- pkg/generated/models/jar_v001_schema.go | 2 +- pkg/generated/models/rekord_schema.go | 2 +- pkg/generated/models/rekord_v001_schema.go | 2 +- pkg/generated/models/rfc3161_schema.go | 2 +- pkg/generated/models/rfc3161_v001_schema.go | 2 +- pkg/generated/models/rpm_schema.go | 2 +- pkg/generated/models/rpm_v001_schema.go | 2 +- pkg/generated/models/tuf_schema.go | 2 +- pkg/generated/models/tuf_v001_schema.go | 2 +- .../restapi/configure_rekor_server.go | 4 -- pkg/generated/restapi/doc.go | 28 ++++++----- pkg/generated/restapi/embedded_spec.go | 12 ++--- .../operations/entries/create_log_entry.go | 7 ++- .../entries/create_log_entry_responses.go | 12 +++-- .../entries/get_log_entry_by_index.go | 4 +- .../get_log_entry_by_index_responses.go | 9 ++-- .../entries/get_log_entry_by_uuid.go | 6 +-- .../get_log_entry_by_uuid_responses.go | 9 ++-- .../operations/entries/search_log_query.go | 4 +- .../entries/search_log_query_responses.go | 9 ++-- .../restapi/operations/index/search_index.go | 4 +- .../index/search_index_responses.go | 9 ++-- .../operations/pubkey/get_public_key.go | 6 +-- .../pubkey/get_public_key_responses.go | 6 ++- .../restapi/operations/rekor_server_api.go | 19 -------- .../operations/server/get_rekor_version.go | 4 +- .../server/get_rekor_version_responses.go | 6 ++- .../restapi/operations/tlog/get_log_info.go | 6 +-- .../operations/tlog/get_log_info_responses.go | 6 ++- .../restapi/operations/tlog/get_log_proof.go | 6 +-- .../tlog/get_log_proof_responses.go | 9 ++-- pkg/sharding/ranges.go | 6 +-- 69 files changed, 242 insertions(+), 253 deletions(-) delete mode 100644 pkg/client/yaml.go diff --git a/openapi.yaml b/openapi.yaml index fa53c02ab..dcba72992 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -25,10 +25,8 @@ schemes: consumes: - application/json - - application/yaml produces: - - application/json;q=1 - - application/yaml + - application/json paths: /api/v1/version: diff --git a/pkg/client/rekor_client.go b/pkg/client/rekor_client.go index f676e7e96..9d2804916 100644 --- a/pkg/client/rekor_client.go +++ b/pkg/client/rekor_client.go @@ -33,10 +33,10 @@ func GetRekorClient(rekorServerURL string, opts ...Option) (*client.Rekor, error o := makeOptions(opts...) rt := httptransport.New(url.Host, client.DefaultBasePath, []string{url.Scheme}) - rt.Consumers["application/yaml"] = YamlConsumer() + rt.Consumers["application/json"] = runtime.JSONConsumer() rt.Consumers["application/x-pem-file"] = runtime.TextConsumer() rt.Consumers["application/pem-certificate-chain"] = runtime.TextConsumer() - rt.Producers["application/yaml"] = YamlProducer() + rt.Producers["application/json"] = runtime.JSONProducer() rt.Producers["application/timestamp-query"] = runtime.ByteStreamProducer() rt.Consumers["application/timestamp-reply"] = runtime.ByteStreamConsumer() diff --git a/pkg/client/yaml.go b/pkg/client/yaml.go deleted file mode 100644 index e738cf9f4..000000000 --- a/pkg/client/yaml.go +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2021 The Sigstore Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package client - -import ( - "bytes" - "io" - "io/ioutil" - - "github.com/ghodss/yaml" - "github.com/go-openapi/runtime" -) - -func YamlConsumer() runtime.Consumer { - return runtime.ConsumerFunc(func(r io.Reader, v interface{}) error { - bytes, err := ioutil.ReadAll(r) - if err != nil { - return err - } - return yaml.Unmarshal(bytes, v) - }) -} - -func YamlProducer() runtime.Producer { - return runtime.ProducerFunc(func(w io.Writer, v interface{}) error { - b, err := yaml.Marshal(v) - if err != nil { - return err - } - _, err = io.Copy(w, bytes.NewReader(b)) - return err - }) -} diff --git a/pkg/generated/client/entries/create_log_entry_parameters.go b/pkg/generated/client/entries/create_log_entry_parameters.go index c5ccd2128..481fa2bda 100644 --- a/pkg/generated/client/entries/create_log_entry_parameters.go +++ b/pkg/generated/client/entries/create_log_entry_parameters.go @@ -70,10 +70,12 @@ func NewCreateLogEntryParamsWithHTTPClient(client *http.Client) *CreateLogEntryP } } -/* CreateLogEntryParams contains all the parameters to send to the API endpoint - for the create log entry operation. +/* +CreateLogEntryParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the create log entry operation. + + Typically these are written to a http.Request. */ type CreateLogEntryParams struct { diff --git a/pkg/generated/client/entries/create_log_entry_responses.go b/pkg/generated/client/entries/create_log_entry_responses.go index 135bf9ca7..e0e3ee156 100644 --- a/pkg/generated/client/entries/create_log_entry_responses.go +++ b/pkg/generated/client/entries/create_log_entry_responses.go @@ -75,7 +75,8 @@ func NewCreateLogEntryCreated() *CreateLogEntryCreated { return &CreateLogEntryCreated{} } -/* CreateLogEntryCreated describes a response with status code 201, with default header values. +/* +CreateLogEntryCreated describes a response with status code 201, with default header values. Returns the entry created in the transparency log */ @@ -134,7 +135,8 @@ func NewCreateLogEntryBadRequest() *CreateLogEntryBadRequest { return &CreateLogEntryBadRequest{} } -/* CreateLogEntryBadRequest describes a response with status code 400, with default header values. +/* +CreateLogEntryBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -166,7 +168,8 @@ func NewCreateLogEntryConflict() *CreateLogEntryConflict { return &CreateLogEntryConflict{} } -/* CreateLogEntryConflict describes a response with status code 409, with default header values. +/* +CreateLogEntryConflict describes a response with status code 409, with default header values. The request conflicts with the current state of the transparency log */ @@ -213,7 +216,8 @@ func NewCreateLogEntryDefault(code int) *CreateLogEntryDefault { } } -/* CreateLogEntryDefault describes a response with status code -1, with default header values. +/* +CreateLogEntryDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/entries/entries_client.go b/pkg/generated/client/entries/entries_client.go index a6a9bf19f..fe2630eaf 100644 --- a/pkg/generated/client/entries/entries_client.go +++ b/pkg/generated/client/entries/entries_client.go @@ -56,10 +56,9 @@ type ClientService interface { } /* - CreateLogEntry creates an entry in the transparency log - - Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. +CreateLogEntry creates an entry in the transparency log +Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. */ func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOption) (*CreateLogEntryCreated, error) { // TODO: Validate the params before sending @@ -70,8 +69,8 @@ func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOpti ID: "createLogEntry", Method: "POST", PathPattern: "/api/v1/log/entries", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &CreateLogEntryReader{formats: a.formats}, @@ -96,7 +95,7 @@ func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOpti } /* - GetLogEntryByIndex retrieves an entry and inclusion proof from the transparency log if it exists by index +GetLogEntryByIndex retrieves an entry and inclusion proof from the transparency log if it exists by index */ func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...ClientOption) (*GetLogEntryByIndexOK, error) { // TODO: Validate the params before sending @@ -107,8 +106,8 @@ func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...Cl ID: "getLogEntryByIndex", Method: "GET", PathPattern: "/api/v1/log/entries", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &GetLogEntryByIndexReader{formats: a.formats}, @@ -133,9 +132,9 @@ func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...Cl } /* - GetLogEntryByUUID gets log entry and information required to generate an inclusion proof for the entry in the transparency log +GetLogEntryByUUID gets log entry and information required to generate an inclusion proof for the entry in the transparency log - Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log +Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log */ func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...ClientOption) (*GetLogEntryByUUIDOK, error) { // TODO: Validate the params before sending @@ -146,8 +145,8 @@ func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...Clie ID: "getLogEntryByUUID", Method: "GET", PathPattern: "/api/v1/log/entries/{entryUUID}", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &GetLogEntryByUUIDReader{formats: a.formats}, @@ -172,7 +171,7 @@ func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...Clie } /* - SearchLogQuery searches transparency log for one or more log entries +SearchLogQuery searches transparency log for one or more log entries */ func (a *Client) SearchLogQuery(params *SearchLogQueryParams, opts ...ClientOption) (*SearchLogQueryOK, error) { // TODO: Validate the params before sending @@ -183,8 +182,8 @@ func (a *Client) SearchLogQuery(params *SearchLogQueryParams, opts ...ClientOpti ID: "searchLogQuery", Method: "POST", PathPattern: "/api/v1/log/entries/retrieve", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &SearchLogQueryReader{formats: a.formats}, diff --git a/pkg/generated/client/entries/get_log_entry_by_index_parameters.go b/pkg/generated/client/entries/get_log_entry_by_index_parameters.go index 405dee67c..e22522751 100644 --- a/pkg/generated/client/entries/get_log_entry_by_index_parameters.go +++ b/pkg/generated/client/entries/get_log_entry_by_index_parameters.go @@ -69,10 +69,12 @@ func NewGetLogEntryByIndexParamsWithHTTPClient(client *http.Client) *GetLogEntry } } -/* GetLogEntryByIndexParams contains all the parameters to send to the API endpoint - for the get log entry by index operation. +/* +GetLogEntryByIndexParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get log entry by index operation. + + Typically these are written to a http.Request. */ type GetLogEntryByIndexParams struct { diff --git a/pkg/generated/client/entries/get_log_entry_by_index_responses.go b/pkg/generated/client/entries/get_log_entry_by_index_responses.go index 8b510fcad..fd8419e17 100644 --- a/pkg/generated/client/entries/get_log_entry_by_index_responses.go +++ b/pkg/generated/client/entries/get_log_entry_by_index_responses.go @@ -68,7 +68,8 @@ func NewGetLogEntryByIndexOK() *GetLogEntryByIndexOK { return &GetLogEntryByIndexOK{} } -/* GetLogEntryByIndexOK describes a response with status code 200, with default header values. +/* +GetLogEntryByIndexOK describes a response with status code 200, with default header values. the entry in the transparency log requested along with an inclusion proof */ @@ -98,7 +99,8 @@ func NewGetLogEntryByIndexNotFound() *GetLogEntryByIndexNotFound { return &GetLogEntryByIndexNotFound{} } -/* GetLogEntryByIndexNotFound describes a response with status code 404, with default header values. +/* +GetLogEntryByIndexNotFound describes a response with status code 404, with default header values. The content requested could not be found */ @@ -121,7 +123,8 @@ func NewGetLogEntryByIndexDefault(code int) *GetLogEntryByIndexDefault { } } -/* GetLogEntryByIndexDefault describes a response with status code -1, with default header values. +/* +GetLogEntryByIndexDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go b/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go index 560bee016..5c88b5265 100644 --- a/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go +++ b/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go @@ -68,10 +68,12 @@ func NewGetLogEntryByUUIDParamsWithHTTPClient(client *http.Client) *GetLogEntryB } } -/* GetLogEntryByUUIDParams contains all the parameters to send to the API endpoint - for the get log entry by UUID operation. +/* +GetLogEntryByUUIDParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get log entry by UUID operation. + + Typically these are written to a http.Request. */ type GetLogEntryByUUIDParams struct { diff --git a/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go b/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go index 9d46b2fa4..2f800f38a 100644 --- a/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go +++ b/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go @@ -68,7 +68,8 @@ func NewGetLogEntryByUUIDOK() *GetLogEntryByUUIDOK { return &GetLogEntryByUUIDOK{} } -/* GetLogEntryByUUIDOK describes a response with status code 200, with default header values. +/* +GetLogEntryByUUIDOK describes a response with status code 200, with default header values. Information needed for a client to compute the inclusion proof */ @@ -98,7 +99,8 @@ func NewGetLogEntryByUUIDNotFound() *GetLogEntryByUUIDNotFound { return &GetLogEntryByUUIDNotFound{} } -/* GetLogEntryByUUIDNotFound describes a response with status code 404, with default header values. +/* +GetLogEntryByUUIDNotFound describes a response with status code 404, with default header values. The content requested could not be found */ @@ -121,7 +123,8 @@ func NewGetLogEntryByUUIDDefault(code int) *GetLogEntryByUUIDDefault { } } -/* GetLogEntryByUUIDDefault describes a response with status code -1, with default header values. +/* +GetLogEntryByUUIDDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/entries/search_log_query_parameters.go b/pkg/generated/client/entries/search_log_query_parameters.go index 459f1208e..ed158ce23 100644 --- a/pkg/generated/client/entries/search_log_query_parameters.go +++ b/pkg/generated/client/entries/search_log_query_parameters.go @@ -70,10 +70,12 @@ func NewSearchLogQueryParamsWithHTTPClient(client *http.Client) *SearchLogQueryP } } -/* SearchLogQueryParams contains all the parameters to send to the API endpoint - for the search log query operation. +/* +SearchLogQueryParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the search log query operation. + + Typically these are written to a http.Request. */ type SearchLogQueryParams struct { diff --git a/pkg/generated/client/entries/search_log_query_responses.go b/pkg/generated/client/entries/search_log_query_responses.go index c459c0cce..6107ec807 100644 --- a/pkg/generated/client/entries/search_log_query_responses.go +++ b/pkg/generated/client/entries/search_log_query_responses.go @@ -68,7 +68,8 @@ func NewSearchLogQueryOK() *SearchLogQueryOK { return &SearchLogQueryOK{} } -/* SearchLogQueryOK describes a response with status code 200, with default header values. +/* +SearchLogQueryOK describes a response with status code 200, with default header values. Returns zero or more entries from the transparency log, according to how many were included in request query */ @@ -98,7 +99,8 @@ func NewSearchLogQueryBadRequest() *SearchLogQueryBadRequest { return &SearchLogQueryBadRequest{} } -/* SearchLogQueryBadRequest describes a response with status code 400, with default header values. +/* +SearchLogQueryBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -132,7 +134,8 @@ func NewSearchLogQueryDefault(code int) *SearchLogQueryDefault { } } -/* SearchLogQueryDefault describes a response with status code -1, with default header values. +/* +SearchLogQueryDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/index/index_client.go b/pkg/generated/client/index/index_client.go index bbe0f579c..35964c0d6 100644 --- a/pkg/generated/client/index/index_client.go +++ b/pkg/generated/client/index/index_client.go @@ -50,7 +50,7 @@ type ClientService interface { } /* - SearchIndex searches index by entry metadata +SearchIndex searches index by entry metadata */ func (a *Client) SearchIndex(params *SearchIndexParams, opts ...ClientOption) (*SearchIndexOK, error) { // TODO: Validate the params before sending @@ -61,8 +61,8 @@ func (a *Client) SearchIndex(params *SearchIndexParams, opts ...ClientOption) (* ID: "searchIndex", Method: "POST", PathPattern: "/api/v1/index/retrieve", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &SearchIndexReader{formats: a.formats}, diff --git a/pkg/generated/client/index/search_index_parameters.go b/pkg/generated/client/index/search_index_parameters.go index d54879b0f..c1694193e 100644 --- a/pkg/generated/client/index/search_index_parameters.go +++ b/pkg/generated/client/index/search_index_parameters.go @@ -70,10 +70,12 @@ func NewSearchIndexParamsWithHTTPClient(client *http.Client) *SearchIndexParams } } -/* SearchIndexParams contains all the parameters to send to the API endpoint - for the search index operation. +/* +SearchIndexParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the search index operation. + + Typically these are written to a http.Request. */ type SearchIndexParams struct { diff --git a/pkg/generated/client/index/search_index_responses.go b/pkg/generated/client/index/search_index_responses.go index 587a93817..34d4d9712 100644 --- a/pkg/generated/client/index/search_index_responses.go +++ b/pkg/generated/client/index/search_index_responses.go @@ -68,7 +68,8 @@ func NewSearchIndexOK() *SearchIndexOK { return &SearchIndexOK{} } -/* SearchIndexOK describes a response with status code 200, with default header values. +/* +SearchIndexOK describes a response with status code 200, with default header values. Returns zero or more entry UUIDs from the transparency log based on search query */ @@ -98,7 +99,8 @@ func NewSearchIndexBadRequest() *SearchIndexBadRequest { return &SearchIndexBadRequest{} } -/* SearchIndexBadRequest describes a response with status code 400, with default header values. +/* +SearchIndexBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -132,7 +134,8 @@ func NewSearchIndexDefault(code int) *SearchIndexDefault { } } -/* SearchIndexDefault describes a response with status code -1, with default header values. +/* +SearchIndexDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/pubkey/get_public_key_parameters.go b/pkg/generated/client/pubkey/get_public_key_parameters.go index d878ea00d..b4248c933 100644 --- a/pkg/generated/client/pubkey/get_public_key_parameters.go +++ b/pkg/generated/client/pubkey/get_public_key_parameters.go @@ -68,10 +68,12 @@ func NewGetPublicKeyParamsWithHTTPClient(client *http.Client) *GetPublicKeyParam } } -/* GetPublicKeyParams contains all the parameters to send to the API endpoint - for the get public key operation. +/* +GetPublicKeyParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get public key operation. + + Typically these are written to a http.Request. */ type GetPublicKeyParams struct { diff --git a/pkg/generated/client/pubkey/get_public_key_responses.go b/pkg/generated/client/pubkey/get_public_key_responses.go index 10f69739f..babe73ca0 100644 --- a/pkg/generated/client/pubkey/get_public_key_responses.go +++ b/pkg/generated/client/pubkey/get_public_key_responses.go @@ -62,7 +62,8 @@ func NewGetPublicKeyOK() *GetPublicKeyOK { return &GetPublicKeyOK{} } -/* GetPublicKeyOK describes a response with status code 200, with default header values. +/* +GetPublicKeyOK describes a response with status code 200, with default header values. The public key */ @@ -94,7 +95,8 @@ func NewGetPublicKeyDefault(code int) *GetPublicKeyDefault { } } -/* GetPublicKeyDefault describes a response with status code -1, with default header values. +/* +GetPublicKeyDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/pubkey/pubkey_client.go b/pkg/generated/client/pubkey/pubkey_client.go index dd09cae30..714d2de26 100644 --- a/pkg/generated/client/pubkey/pubkey_client.go +++ b/pkg/generated/client/pubkey/pubkey_client.go @@ -50,9 +50,9 @@ type ClientService interface { } /* - GetPublicKey retrieves the public key that can be used to validate the signed tree head +GetPublicKey retrieves the public key that can be used to validate the signed tree head - Returns the public key that can be used to validate the signed tree head +Returns the public key that can be used to validate the signed tree head */ func (a *Client) GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) (*GetPublicKeyOK, error) { // TODO: Validate the params before sending @@ -64,7 +64,7 @@ func (a *Client) GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) Method: "GET", PathPattern: "/api/v1/log/publicKey", ProducesMediaTypes: []string{"application/x-pem-file"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &GetPublicKeyReader{formats: a.formats}, diff --git a/pkg/generated/client/server/get_rekor_version_parameters.go b/pkg/generated/client/server/get_rekor_version_parameters.go index 419217f70..fd4e30c2b 100644 --- a/pkg/generated/client/server/get_rekor_version_parameters.go +++ b/pkg/generated/client/server/get_rekor_version_parameters.go @@ -68,10 +68,12 @@ func NewGetRekorVersionParamsWithHTTPClient(client *http.Client) *GetRekorVersio } } -/* GetRekorVersionParams contains all the parameters to send to the API endpoint - for the get rekor version operation. +/* +GetRekorVersionParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get rekor version operation. + + Typically these are written to a http.Request. */ type GetRekorVersionParams struct { timeout time.Duration diff --git a/pkg/generated/client/server/get_rekor_version_responses.go b/pkg/generated/client/server/get_rekor_version_responses.go index fe165eae3..4c84daf90 100644 --- a/pkg/generated/client/server/get_rekor_version_responses.go +++ b/pkg/generated/client/server/get_rekor_version_responses.go @@ -62,7 +62,8 @@ func NewGetRekorVersionOK() *GetRekorVersionOK { return &GetRekorVersionOK{} } -/* GetRekorVersionOK describes a response with status code 200, with default header values. +/* +GetRekorVersionOK describes a response with status code 200, with default header values. A JSON object with the running rekor version */ @@ -96,7 +97,8 @@ func NewGetRekorVersionDefault(code int) *GetRekorVersionDefault { } } -/* GetRekorVersionDefault describes a response with status code -1, with default header values. +/* +GetRekorVersionDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/server/server_client.go b/pkg/generated/client/server/server_client.go index 2bd9b8864..fb7a6222f 100644 --- a/pkg/generated/client/server/server_client.go +++ b/pkg/generated/client/server/server_client.go @@ -50,7 +50,7 @@ type ClientService interface { } /* - GetRekorVersion gets the current version of the rekor server +GetRekorVersion gets the current version of the rekor server */ func (a *Client) GetRekorVersion(params *GetRekorVersionParams, opts ...ClientOption) (*GetRekorVersionOK, error) { // TODO: Validate the params before sending @@ -61,8 +61,8 @@ func (a *Client) GetRekorVersion(params *GetRekorVersionParams, opts ...ClientOp ID: "getRekorVersion", Method: "GET", PathPattern: "/api/v1/version", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &GetRekorVersionReader{formats: a.formats}, diff --git a/pkg/generated/client/tlog/get_log_info_parameters.go b/pkg/generated/client/tlog/get_log_info_parameters.go index f051485ae..e0ae2cdd3 100644 --- a/pkg/generated/client/tlog/get_log_info_parameters.go +++ b/pkg/generated/client/tlog/get_log_info_parameters.go @@ -68,10 +68,12 @@ func NewGetLogInfoParamsWithHTTPClient(client *http.Client) *GetLogInfoParams { } } -/* GetLogInfoParams contains all the parameters to send to the API endpoint - for the get log info operation. +/* +GetLogInfoParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get log info operation. + + Typically these are written to a http.Request. */ type GetLogInfoParams struct { timeout time.Duration diff --git a/pkg/generated/client/tlog/get_log_info_responses.go b/pkg/generated/client/tlog/get_log_info_responses.go index d8157506a..7d6d15405 100644 --- a/pkg/generated/client/tlog/get_log_info_responses.go +++ b/pkg/generated/client/tlog/get_log_info_responses.go @@ -62,7 +62,8 @@ func NewGetLogInfoOK() *GetLogInfoOK { return &GetLogInfoOK{} } -/* GetLogInfoOK describes a response with status code 200, with default header values. +/* +GetLogInfoOK describes a response with status code 200, with default header values. A JSON object with the root hash and tree size as properties */ @@ -96,7 +97,8 @@ func NewGetLogInfoDefault(code int) *GetLogInfoDefault { } } -/* GetLogInfoDefault describes a response with status code -1, with default header values. +/* +GetLogInfoDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/tlog/get_log_proof_parameters.go b/pkg/generated/client/tlog/get_log_proof_parameters.go index 8d504b6cf..2b21ad887 100644 --- a/pkg/generated/client/tlog/get_log_proof_parameters.go +++ b/pkg/generated/client/tlog/get_log_proof_parameters.go @@ -69,10 +69,12 @@ func NewGetLogProofParamsWithHTTPClient(client *http.Client) *GetLogProofParams } } -/* GetLogProofParams contains all the parameters to send to the API endpoint - for the get log proof operation. +/* +GetLogProofParams contains all the parameters to send to the API endpoint - Typically these are written to a http.Request. + for the get log proof operation. + + Typically these are written to a http.Request. */ type GetLogProofParams struct { diff --git a/pkg/generated/client/tlog/get_log_proof_responses.go b/pkg/generated/client/tlog/get_log_proof_responses.go index 76ebadb10..2ec83fcaf 100644 --- a/pkg/generated/client/tlog/get_log_proof_responses.go +++ b/pkg/generated/client/tlog/get_log_proof_responses.go @@ -68,7 +68,8 @@ func NewGetLogProofOK() *GetLogProofOK { return &GetLogProofOK{} } -/* GetLogProofOK describes a response with status code 200, with default header values. +/* +GetLogProofOK describes a response with status code 200, with default header values. All hashes required to compute the consistency proof */ @@ -100,7 +101,8 @@ func NewGetLogProofBadRequest() *GetLogProofBadRequest { return &GetLogProofBadRequest{} } -/* GetLogProofBadRequest describes a response with status code 400, with default header values. +/* +GetLogProofBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -134,7 +136,8 @@ func NewGetLogProofDefault(code int) *GetLogProofDefault { } } -/* GetLogProofDefault describes a response with status code -1, with default header values. +/* +GetLogProofDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/tlog/tlog_client.go b/pkg/generated/client/tlog/tlog_client.go index 2fbb024d8..f53f6c7f8 100644 --- a/pkg/generated/client/tlog/tlog_client.go +++ b/pkg/generated/client/tlog/tlog_client.go @@ -52,9 +52,9 @@ type ClientService interface { } /* - GetLogInfo gets information about the current state of the transparency log +GetLogInfo gets information about the current state of the transparency log - Returns the current root hash and size of the merkle tree used to store the log entries. +Returns the current root hash and size of the merkle tree used to store the log entries. */ func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*GetLogInfoOK, error) { // TODO: Validate the params before sending @@ -65,8 +65,8 @@ func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*Ge ID: "getLogInfo", Method: "GET", PathPattern: "/api/v1/log", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &GetLogInfoReader{formats: a.formats}, @@ -91,9 +91,9 @@ func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*Ge } /* - GetLogProof gets information required to generate a consistency proof for the transparency log +GetLogProof gets information required to generate a consistency proof for the transparency log - Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log +Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log */ func (a *Client) GetLogProof(params *GetLogProofParams, opts ...ClientOption) (*GetLogProofOK, error) { // TODO: Validate the params before sending @@ -104,8 +104,8 @@ func (a *Client) GetLogProof(params *GetLogProofParams, opts ...ClientOption) (* ID: "getLogProof", Method: "GET", PathPattern: "/api/v1/log/proof", - ProducesMediaTypes: []string{"application/json;q=1", "application/yaml"}, - ConsumesMediaTypes: []string{"application/json", "application/yaml"}, + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"http"}, Params: params, Reader: &GetLogProofReader{formats: a.formats}, diff --git a/pkg/generated/models/alpine_schema.go b/pkg/generated/models/alpine_schema.go index 49dd12b6b..edd25408b 100644 --- a/pkg/generated/models/alpine_schema.go +++ b/pkg/generated/models/alpine_schema.go @@ -23,7 +23,7 @@ package models // AlpineSchema Alpine Package Schema // -// Schema for Alpine package objects +// # Schema for Alpine package objects // // swagger:model alpineSchema type AlpineSchema interface{} diff --git a/pkg/generated/models/alpine_v001_schema.go b/pkg/generated/models/alpine_v001_schema.go index 999a48697..6cf1181b0 100644 --- a/pkg/generated/models/alpine_v001_schema.go +++ b/pkg/generated/models/alpine_v001_schema.go @@ -33,7 +33,7 @@ import ( // AlpineV001Schema Alpine v0.0.1 Schema // -// Schema for Alpine Package entries +// # Schema for Alpine Package entries // // swagger:model alpineV001Schema type AlpineV001Schema struct { diff --git a/pkg/generated/models/cose_schema.go b/pkg/generated/models/cose_schema.go index 1d4f0dca1..e653f2202 100644 --- a/pkg/generated/models/cose_schema.go +++ b/pkg/generated/models/cose_schema.go @@ -23,7 +23,7 @@ package models // CoseSchema COSE Schema // -// COSE for Rekord objects +// # COSE for Rekord objects // // swagger:model coseSchema type CoseSchema interface{} diff --git a/pkg/generated/models/cose_v001_schema.go b/pkg/generated/models/cose_v001_schema.go index caadb44d4..ea7f467da 100644 --- a/pkg/generated/models/cose_v001_schema.go +++ b/pkg/generated/models/cose_v001_schema.go @@ -33,7 +33,7 @@ import ( // CoseV001Schema cose v0.0.1 Schema // -// Schema for cose object +// # Schema for cose object // // swagger:model coseV001Schema type CoseV001Schema struct { diff --git a/pkg/generated/models/hashedrekord_schema.go b/pkg/generated/models/hashedrekord_schema.go index 49d5831f8..387a9392b 100644 --- a/pkg/generated/models/hashedrekord_schema.go +++ b/pkg/generated/models/hashedrekord_schema.go @@ -23,7 +23,7 @@ package models // HashedrekordSchema Rekor Schema // -// Schema for Rekord objects +// # Schema for Rekord objects // // swagger:model hashedrekordSchema type HashedrekordSchema interface{} diff --git a/pkg/generated/models/hashedrekord_v001_schema.go b/pkg/generated/models/hashedrekord_v001_schema.go index 50fd24827..1a2dd312f 100644 --- a/pkg/generated/models/hashedrekord_v001_schema.go +++ b/pkg/generated/models/hashedrekord_v001_schema.go @@ -33,7 +33,7 @@ import ( // HashedrekordV001Schema Hashed Rekor v0.0.1 Schema // -// Schema for Hashed Rekord object +// # Schema for Hashed Rekord object // // swagger:model hashedrekordV001Schema type HashedrekordV001Schema struct { diff --git a/pkg/generated/models/helm_schema.go b/pkg/generated/models/helm_schema.go index a6981eb63..0ab87df9c 100644 --- a/pkg/generated/models/helm_schema.go +++ b/pkg/generated/models/helm_schema.go @@ -23,7 +23,7 @@ package models // HelmSchema Helm Schema // -// Schema for Helm objects +// # Schema for Helm objects // // swagger:model helmSchema type HelmSchema interface{} diff --git a/pkg/generated/models/helm_v001_schema.go b/pkg/generated/models/helm_v001_schema.go index 1512dad32..e0942574b 100644 --- a/pkg/generated/models/helm_v001_schema.go +++ b/pkg/generated/models/helm_v001_schema.go @@ -33,7 +33,7 @@ import ( // HelmV001Schema Helm v0.0.1 Schema // -// Schema for Helm object +// # Schema for Helm object // // swagger:model helmV001Schema type HelmV001Schema struct { diff --git a/pkg/generated/models/intoto_schema.go b/pkg/generated/models/intoto_schema.go index 3533f9d59..a7fdaa6a6 100644 --- a/pkg/generated/models/intoto_schema.go +++ b/pkg/generated/models/intoto_schema.go @@ -23,7 +23,7 @@ package models // IntotoSchema Intoto Schema // -// Intoto for Rekord objects +// # Intoto for Rekord objects // // swagger:model intotoSchema type IntotoSchema interface{} diff --git a/pkg/generated/models/intoto_v001_schema.go b/pkg/generated/models/intoto_v001_schema.go index e43e699f7..dffbecd33 100644 --- a/pkg/generated/models/intoto_v001_schema.go +++ b/pkg/generated/models/intoto_v001_schema.go @@ -33,7 +33,7 @@ import ( // IntotoV001Schema intoto v0.0.1 Schema // -// Schema for intoto object +// # Schema for intoto object // // swagger:model intotoV001Schema type IntotoV001Schema struct { diff --git a/pkg/generated/models/jar_schema.go b/pkg/generated/models/jar_schema.go index d45c53da7..e7b9a590e 100644 --- a/pkg/generated/models/jar_schema.go +++ b/pkg/generated/models/jar_schema.go @@ -23,7 +23,7 @@ package models // JarSchema JAR Schema // -// Schema for JAR objects +// # Schema for JAR objects // // swagger:model jarSchema type JarSchema interface{} diff --git a/pkg/generated/models/jar_v001_schema.go b/pkg/generated/models/jar_v001_schema.go index 24f6d3b2b..7a49b3e2e 100644 --- a/pkg/generated/models/jar_v001_schema.go +++ b/pkg/generated/models/jar_v001_schema.go @@ -33,7 +33,7 @@ import ( // JarV001Schema JAR v0.0.1 Schema // -// Schema for JAR entries +// # Schema for JAR entries // // swagger:model jarV001Schema type JarV001Schema struct { diff --git a/pkg/generated/models/rekord_schema.go b/pkg/generated/models/rekord_schema.go index 7bf278330..e85442ae9 100644 --- a/pkg/generated/models/rekord_schema.go +++ b/pkg/generated/models/rekord_schema.go @@ -23,7 +23,7 @@ package models // RekordSchema Rekor Schema // -// Schema for Rekord objects +// # Schema for Rekord objects // // swagger:model rekordSchema type RekordSchema interface{} diff --git a/pkg/generated/models/rekord_v001_schema.go b/pkg/generated/models/rekord_v001_schema.go index ddc6ec290..3d0446a5b 100644 --- a/pkg/generated/models/rekord_v001_schema.go +++ b/pkg/generated/models/rekord_v001_schema.go @@ -33,7 +33,7 @@ import ( // RekordV001Schema Rekor v0.0.1 Schema // -// Schema for Rekord object +// # Schema for Rekord object // // swagger:model rekordV001Schema type RekordV001Schema struct { diff --git a/pkg/generated/models/rfc3161_schema.go b/pkg/generated/models/rfc3161_schema.go index 90667a4aa..826013a28 100644 --- a/pkg/generated/models/rfc3161_schema.go +++ b/pkg/generated/models/rfc3161_schema.go @@ -23,7 +23,7 @@ package models // Rfc3161Schema Timestamp Schema // -// Schema for RFC 3161 timestamp objects +// # Schema for RFC 3161 timestamp objects // // swagger:model rfc3161Schema type Rfc3161Schema interface{} diff --git a/pkg/generated/models/rfc3161_v001_schema.go b/pkg/generated/models/rfc3161_v001_schema.go index 49f317a76..fe668412d 100644 --- a/pkg/generated/models/rfc3161_v001_schema.go +++ b/pkg/generated/models/rfc3161_v001_schema.go @@ -32,7 +32,7 @@ import ( // Rfc3161V001Schema Timestamp v0.0.1 Schema // -// Schema for RFC3161 entries +// # Schema for RFC3161 entries // // swagger:model rfc3161V001Schema type Rfc3161V001Schema struct { diff --git a/pkg/generated/models/rpm_schema.go b/pkg/generated/models/rpm_schema.go index 0304bbe77..5cb378366 100644 --- a/pkg/generated/models/rpm_schema.go +++ b/pkg/generated/models/rpm_schema.go @@ -23,7 +23,7 @@ package models // RpmSchema RPM Schema // -// Schema for RPM objects +// # Schema for RPM objects // // swagger:model rpmSchema type RpmSchema interface{} diff --git a/pkg/generated/models/rpm_v001_schema.go b/pkg/generated/models/rpm_v001_schema.go index 6f3cb07c9..82a75c1de 100644 --- a/pkg/generated/models/rpm_v001_schema.go +++ b/pkg/generated/models/rpm_v001_schema.go @@ -33,7 +33,7 @@ import ( // RpmV001Schema RPM v0.0.1 Schema // -// Schema for RPM entries +// # Schema for RPM entries // // swagger:model rpmV001Schema type RpmV001Schema struct { diff --git a/pkg/generated/models/tuf_schema.go b/pkg/generated/models/tuf_schema.go index 425a546ec..37dca8b68 100644 --- a/pkg/generated/models/tuf_schema.go +++ b/pkg/generated/models/tuf_schema.go @@ -23,7 +23,7 @@ package models // TUFSchema TUF Schema // -// Schema for TUF metadata objects +// # Schema for TUF metadata objects // // swagger:model tufSchema type TUFSchema interface{} diff --git a/pkg/generated/models/tuf_v001_schema.go b/pkg/generated/models/tuf_v001_schema.go index d015607ff..f8bf4b020 100644 --- a/pkg/generated/models/tuf_v001_schema.go +++ b/pkg/generated/models/tuf_v001_schema.go @@ -32,7 +32,7 @@ import ( // TUFV001Schema TUF v0.0.1 Schema // -// Schema for TUF metadata entries +// # Schema for TUF metadata entries // // swagger:model tufV001Schema type TUFV001Schema struct { diff --git a/pkg/generated/restapi/configure_rekor_server.go b/pkg/generated/restapi/configure_rekor_server.go index 212369d89..18ef50ec9 100644 --- a/pkg/generated/restapi/configure_rekor_server.go +++ b/pkg/generated/restapi/configure_rekor_server.go @@ -34,7 +34,6 @@ import ( "github.com/spf13/viper" pkgapi "github.com/sigstore/rekor/pkg/api" - "github.com/sigstore/rekor/pkg/client" "github.com/sigstore/rekor/pkg/generated/restapi/operations" "github.com/sigstore/rekor/pkg/generated/restapi/operations/entries" "github.com/sigstore/rekor/pkg/generated/restapi/operations/index" @@ -71,9 +70,6 @@ func configureAPI(api *operations.RekorServerAPI) http.Handler { api.JSONConsumer = runtime.JSONConsumer() api.JSONProducer = runtime.JSONProducer() - api.YamlConsumer = client.YamlConsumer() - api.YamlProducer = client.YamlProducer() - api.ApplicationXPemFileProducer = runtime.TextProducer() api.EntriesCreateLogEntryHandler = entries.CreateLogEntryHandlerFunc(pkgapi.CreateLogEntryHandler) diff --git a/pkg/generated/restapi/doc.go b/pkg/generated/restapi/doc.go index b2462c637..8b8735f1c 100644 --- a/pkg/generated/restapi/doc.go +++ b/pkg/generated/restapi/doc.go @@ -17,21 +17,19 @@ // Package restapi Rekor // -// Rekor is a cryptographically secure, immutable transparency log for signed software releases. -// Schemes: -// http -// Host: rekor.sigstore.dev -// BasePath: / -// Version: 0.0.1 -// -// Consumes: -// - application/json -// - application/yaml -// -// Produces: -// - application/x-pem-file -// - application/json -// - application/yaml +// Rekor is a cryptographically secure, immutable transparency log for signed software releases. +// Schemes: +// http +// Host: rekor.sigstore.dev +// BasePath: / +// Version: 0.0.1 +// +// Consumes: +// - application/json +// +// Produces: +// - application/x-pem-file +// - application/json // // swagger:meta package restapi diff --git a/pkg/generated/restapi/embedded_spec.go b/pkg/generated/restapi/embedded_spec.go index 9aebb0b13..f1c14e252 100644 --- a/pkg/generated/restapi/embedded_spec.go +++ b/pkg/generated/restapi/embedded_spec.go @@ -35,12 +35,10 @@ var ( func init() { SwaggerJSON = json.RawMessage([]byte(`{ "consumes": [ - "application/json", - "application/yaml" + "application/json" ], "produces": [ - "application/json;q=1", - "application/yaml" + "application/json" ], "schemes": [ "http" @@ -943,12 +941,10 @@ func init() { }`)) FlatSwaggerJSON = json.RawMessage([]byte(`{ "consumes": [ - "application/json", - "application/yaml" + "application/json" ], "produces": [ - "application/json;q=1", - "application/yaml" + "application/json" ], "schemes": [ "http" diff --git a/pkg/generated/restapi/operations/entries/create_log_entry.go b/pkg/generated/restapi/operations/entries/create_log_entry.go index 6860514d3..b95c892fb 100644 --- a/pkg/generated/restapi/operations/entries/create_log_entry.go +++ b/pkg/generated/restapi/operations/entries/create_log_entry.go @@ -45,13 +45,12 @@ func NewCreateLogEntry(ctx *middleware.Context, handler CreateLogEntryHandler) * return &CreateLogEntry{Context: ctx, Handler: handler} } -/* CreateLogEntry swagger:route POST /api/v1/log/entries entries createLogEntry +/* + CreateLogEntry swagger:route POST /api/v1/log/entries entries createLogEntry -Creates an entry in the transparency log +# Creates an entry in the transparency log Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. - - */ type CreateLogEntry struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/create_log_entry_responses.go b/pkg/generated/restapi/operations/entries/create_log_entry_responses.go index ddc2839c1..3ff2489f0 100644 --- a/pkg/generated/restapi/operations/entries/create_log_entry_responses.go +++ b/pkg/generated/restapi/operations/entries/create_log_entry_responses.go @@ -33,7 +33,8 @@ import ( // CreateLogEntryCreatedCode is the HTTP code returned for type CreateLogEntryCreated const CreateLogEntryCreatedCode int = 201 -/*CreateLogEntryCreated Returns the entry created in the transparency log +/* +CreateLogEntryCreated Returns the entry created in the transparency log swagger:response createLogEntryCreated */ @@ -124,7 +125,8 @@ func (o *CreateLogEntryCreated) WriteResponse(rw http.ResponseWriter, producer r // CreateLogEntryBadRequestCode is the HTTP code returned for type CreateLogEntryBadRequest const CreateLogEntryBadRequestCode int = 400 -/*CreateLogEntryBadRequest The content supplied to the server was invalid +/* +CreateLogEntryBadRequest The content supplied to the server was invalid swagger:response createLogEntryBadRequest */ @@ -168,7 +170,8 @@ func (o *CreateLogEntryBadRequest) WriteResponse(rw http.ResponseWriter, produce // CreateLogEntryConflictCode is the HTTP code returned for type CreateLogEntryConflict const CreateLogEntryConflictCode int = 409 -/*CreateLogEntryConflict The request conflicts with the current state of the transparency log +/* +CreateLogEntryConflict The request conflicts with the current state of the transparency log swagger:response createLogEntryConflict */ @@ -231,7 +234,8 @@ func (o *CreateLogEntryConflict) WriteResponse(rw http.ResponseWriter, producer } } -/*CreateLogEntryDefault There was an internal error in the server while processing the request +/* +CreateLogEntryDefault There was an internal error in the server while processing the request swagger:response createLogEntryDefault */ diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go index a27e5f608..ee804e5b9 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go @@ -45,10 +45,10 @@ func NewGetLogEntryByIndex(ctx *middleware.Context, handler GetLogEntryByIndexHa return &GetLogEntryByIndex{Context: ctx, Handler: handler} } -/* GetLogEntryByIndex swagger:route GET /api/v1/log/entries entries getLogEntryByIndex +/* + GetLogEntryByIndex swagger:route GET /api/v1/log/entries entries getLogEntryByIndex Retrieves an entry and inclusion proof from the transparency log (if it exists) by index - */ type GetLogEntryByIndex struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go index 3b14b1a36..08d6215ec 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go @@ -32,7 +32,8 @@ import ( // GetLogEntryByIndexOKCode is the HTTP code returned for type GetLogEntryByIndexOK const GetLogEntryByIndexOKCode int = 200 -/*GetLogEntryByIndexOK the entry in the transparency log requested along with an inclusion proof +/* +GetLogEntryByIndexOK the entry in the transparency log requested along with an inclusion proof swagger:response getLogEntryByIndexOK */ @@ -79,7 +80,8 @@ func (o *GetLogEntryByIndexOK) WriteResponse(rw http.ResponseWriter, producer ru // GetLogEntryByIndexNotFoundCode is the HTTP code returned for type GetLogEntryByIndexNotFound const GetLogEntryByIndexNotFoundCode int = 404 -/*GetLogEntryByIndexNotFound The content requested could not be found +/* +GetLogEntryByIndexNotFound The content requested could not be found swagger:response getLogEntryByIndexNotFound */ @@ -100,7 +102,8 @@ func (o *GetLogEntryByIndexNotFound) WriteResponse(rw http.ResponseWriter, produ rw.WriteHeader(404) } -/*GetLogEntryByIndexDefault There was an internal error in the server while processing the request +/* +GetLogEntryByIndexDefault There was an internal error in the server while processing the request swagger:response getLogEntryByIndexDefault */ diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go index ea40f9025..eb04b8693 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go @@ -45,12 +45,12 @@ func NewGetLogEntryByUUID(ctx *middleware.Context, handler GetLogEntryByUUIDHand return &GetLogEntryByUUID{Context: ctx, Handler: handler} } -/* GetLogEntryByUUID swagger:route GET /api/v1/log/entries/{entryUUID} entries getLogEntryByUuid +/* + GetLogEntryByUUID swagger:route GET /api/v1/log/entries/{entryUUID} entries getLogEntryByUuid -Get log entry and information required to generate an inclusion proof for the entry in the transparency log +# Get log entry and information required to generate an inclusion proof for the entry in the transparency log Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log - */ type GetLogEntryByUUID struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go index ccabfba23..1e45fb1cd 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go @@ -32,7 +32,8 @@ import ( // GetLogEntryByUUIDOKCode is the HTTP code returned for type GetLogEntryByUUIDOK const GetLogEntryByUUIDOKCode int = 200 -/*GetLogEntryByUUIDOK Information needed for a client to compute the inclusion proof +/* +GetLogEntryByUUIDOK Information needed for a client to compute the inclusion proof swagger:response getLogEntryByUuidOK */ @@ -79,7 +80,8 @@ func (o *GetLogEntryByUUIDOK) WriteResponse(rw http.ResponseWriter, producer run // GetLogEntryByUUIDNotFoundCode is the HTTP code returned for type GetLogEntryByUUIDNotFound const GetLogEntryByUUIDNotFoundCode int = 404 -/*GetLogEntryByUUIDNotFound The content requested could not be found +/* +GetLogEntryByUUIDNotFound The content requested could not be found swagger:response getLogEntryByUuidNotFound */ @@ -100,7 +102,8 @@ func (o *GetLogEntryByUUIDNotFound) WriteResponse(rw http.ResponseWriter, produc rw.WriteHeader(404) } -/*GetLogEntryByUUIDDefault There was an internal error in the server while processing the request +/* +GetLogEntryByUUIDDefault There was an internal error in the server while processing the request swagger:response getLogEntryByUuidDefault */ diff --git a/pkg/generated/restapi/operations/entries/search_log_query.go b/pkg/generated/restapi/operations/entries/search_log_query.go index 098e225d7..343f3ec52 100644 --- a/pkg/generated/restapi/operations/entries/search_log_query.go +++ b/pkg/generated/restapi/operations/entries/search_log_query.go @@ -45,10 +45,10 @@ func NewSearchLogQuery(ctx *middleware.Context, handler SearchLogQueryHandler) * return &SearchLogQuery{Context: ctx, Handler: handler} } -/* SearchLogQuery swagger:route POST /api/v1/log/entries/retrieve entries searchLogQuery +/* + SearchLogQuery swagger:route POST /api/v1/log/entries/retrieve entries searchLogQuery Searches transparency log for one or more log entries - */ type SearchLogQuery struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/search_log_query_responses.go b/pkg/generated/restapi/operations/entries/search_log_query_responses.go index 3694ef3d8..10d09ff2b 100644 --- a/pkg/generated/restapi/operations/entries/search_log_query_responses.go +++ b/pkg/generated/restapi/operations/entries/search_log_query_responses.go @@ -32,7 +32,8 @@ import ( // SearchLogQueryOKCode is the HTTP code returned for type SearchLogQueryOK const SearchLogQueryOKCode int = 200 -/*SearchLogQueryOK Returns zero or more entries from the transparency log, according to how many were included in request query +/* +SearchLogQueryOK Returns zero or more entries from the transparency log, according to how many were included in request query swagger:response searchLogQueryOK */ @@ -79,7 +80,8 @@ func (o *SearchLogQueryOK) WriteResponse(rw http.ResponseWriter, producer runtim // SearchLogQueryBadRequestCode is the HTTP code returned for type SearchLogQueryBadRequest const SearchLogQueryBadRequestCode int = 400 -/*SearchLogQueryBadRequest The content supplied to the server was invalid +/* +SearchLogQueryBadRequest The content supplied to the server was invalid swagger:response searchLogQueryBadRequest */ @@ -120,7 +122,8 @@ func (o *SearchLogQueryBadRequest) WriteResponse(rw http.ResponseWriter, produce } } -/*SearchLogQueryDefault There was an internal error in the server while processing the request +/* +SearchLogQueryDefault There was an internal error in the server while processing the request swagger:response searchLogQueryDefault */ diff --git a/pkg/generated/restapi/operations/index/search_index.go b/pkg/generated/restapi/operations/index/search_index.go index 5848525c2..f3c1ac6ca 100644 --- a/pkg/generated/restapi/operations/index/search_index.go +++ b/pkg/generated/restapi/operations/index/search_index.go @@ -45,10 +45,10 @@ func NewSearchIndex(ctx *middleware.Context, handler SearchIndexHandler) *Search return &SearchIndex{Context: ctx, Handler: handler} } -/* SearchIndex swagger:route POST /api/v1/index/retrieve index searchIndex +/* + SearchIndex swagger:route POST /api/v1/index/retrieve index searchIndex Searches index by entry metadata - */ type SearchIndex struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/index/search_index_responses.go b/pkg/generated/restapi/operations/index/search_index_responses.go index 4a160125d..6211b99eb 100644 --- a/pkg/generated/restapi/operations/index/search_index_responses.go +++ b/pkg/generated/restapi/operations/index/search_index_responses.go @@ -32,7 +32,8 @@ import ( // SearchIndexOKCode is the HTTP code returned for type SearchIndexOK const SearchIndexOKCode int = 200 -/*SearchIndexOK Returns zero or more entry UUIDs from the transparency log based on search query +/* +SearchIndexOK Returns zero or more entry UUIDs from the transparency log based on search query swagger:response searchIndexOK */ @@ -79,7 +80,8 @@ func (o *SearchIndexOK) WriteResponse(rw http.ResponseWriter, producer runtime.P // SearchIndexBadRequestCode is the HTTP code returned for type SearchIndexBadRequest const SearchIndexBadRequestCode int = 400 -/*SearchIndexBadRequest The content supplied to the server was invalid +/* +SearchIndexBadRequest The content supplied to the server was invalid swagger:response searchIndexBadRequest */ @@ -120,7 +122,8 @@ func (o *SearchIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer r } } -/*SearchIndexDefault There was an internal error in the server while processing the request +/* +SearchIndexDefault There was an internal error in the server while processing the request swagger:response searchIndexDefault */ diff --git a/pkg/generated/restapi/operations/pubkey/get_public_key.go b/pkg/generated/restapi/operations/pubkey/get_public_key.go index 939566b94..688c7bb36 100644 --- a/pkg/generated/restapi/operations/pubkey/get_public_key.go +++ b/pkg/generated/restapi/operations/pubkey/get_public_key.go @@ -45,12 +45,12 @@ func NewGetPublicKey(ctx *middleware.Context, handler GetPublicKeyHandler) *GetP return &GetPublicKey{Context: ctx, Handler: handler} } -/* GetPublicKey swagger:route GET /api/v1/log/publicKey pubkey getPublicKey +/* + GetPublicKey swagger:route GET /api/v1/log/publicKey pubkey getPublicKey -Retrieve the public key that can be used to validate the signed tree head +# Retrieve the public key that can be used to validate the signed tree head Returns the public key that can be used to validate the signed tree head - */ type GetPublicKey struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go b/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go index 6ecb5bf19..1cd51a9df 100644 --- a/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go +++ b/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go @@ -32,7 +32,8 @@ import ( // GetPublicKeyOKCode is the HTTP code returned for type GetPublicKeyOK const GetPublicKeyOKCode int = 200 -/*GetPublicKeyOK The public key +/* +GetPublicKeyOK The public key swagger:response getPublicKeyOK */ @@ -71,7 +72,8 @@ func (o *GetPublicKeyOK) WriteResponse(rw http.ResponseWriter, producer runtime. } } -/*GetPublicKeyDefault There was an internal error in the server while processing the request +/* +GetPublicKeyDefault There was an internal error in the server while processing the request swagger:response getPublicKeyDefault */ diff --git a/pkg/generated/restapi/operations/rekor_server_api.go b/pkg/generated/restapi/operations/rekor_server_api.go index 9be6e2458..50c4f75ec 100644 --- a/pkg/generated/restapi/operations/rekor_server_api.go +++ b/pkg/generated/restapi/operations/rekor_server_api.go @@ -32,7 +32,6 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/runtime/security" - "github.com/go-openapi/runtime/yamlpc" "github.com/go-openapi/spec" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" @@ -63,13 +62,11 @@ func NewRekorServerAPI(spec *loads.Document) *RekorServerAPI { BearerAuthenticator: security.BearerAuth, JSONConsumer: runtime.JSONConsumer(), - YamlConsumer: yamlpc.YAMLConsumer(), ApplicationXPemFileProducer: runtime.ProducerFunc(func(w io.Writer, data interface{}) error { return errors.NotImplemented("applicationXPemFile producer has not yet been implemented") }), JSONProducer: runtime.JSONProducer(), - YamlProducer: yamlpc.YAMLProducer(), EntriesCreateLogEntryHandler: entries.CreateLogEntryHandlerFunc(func(params entries.CreateLogEntryParams) middleware.Responder { return middleware.NotImplemented("operation entries.CreateLogEntry has not yet been implemented") @@ -129,9 +126,6 @@ type RekorServerAPI struct { // JSONConsumer registers a consumer for the following mime types: // - application/json JSONConsumer runtime.Consumer - // YamlConsumer registers a consumer for the following mime types: - // - application/yaml - YamlConsumer runtime.Consumer // ApplicationXPemFileProducer registers a producer for the following mime types: // - application/x-pem-file @@ -139,9 +133,6 @@ type RekorServerAPI struct { // JSONProducer registers a producer for the following mime types: // - application/json JSONProducer runtime.Producer - // YamlProducer registers a producer for the following mime types: - // - application/yaml - YamlProducer runtime.Producer // EntriesCreateLogEntryHandler sets the operation handler for the create log entry operation EntriesCreateLogEntryHandler entries.CreateLogEntryHandler @@ -233,9 +224,6 @@ func (o *RekorServerAPI) Validate() error { if o.JSONConsumer == nil { unregistered = append(unregistered, "JSONConsumer") } - if o.YamlConsumer == nil { - unregistered = append(unregistered, "YamlConsumer") - } if o.ApplicationXPemFileProducer == nil { unregistered = append(unregistered, "ApplicationXPemFileProducer") @@ -243,9 +231,6 @@ func (o *RekorServerAPI) Validate() error { if o.JSONProducer == nil { unregistered = append(unregistered, "JSONProducer") } - if o.YamlProducer == nil { - unregistered = append(unregistered, "YamlProducer") - } if o.EntriesCreateLogEntryHandler == nil { unregistered = append(unregistered, "entries.CreateLogEntryHandler") @@ -305,8 +290,6 @@ func (o *RekorServerAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Co switch mt { case "application/json": result["application/json"] = o.JSONConsumer - case "application/yaml": - result["application/yaml"] = o.YamlConsumer } if c, ok := o.customConsumers[mt]; ok { @@ -326,8 +309,6 @@ func (o *RekorServerAPI) ProducersFor(mediaTypes []string) map[string]runtime.Pr result["application/x-pem-file"] = o.ApplicationXPemFileProducer case "application/json": result["application/json"] = o.JSONProducer - case "application/yaml": - result["application/yaml"] = o.YamlProducer } if p, ok := o.customProducers[mt]; ok { diff --git a/pkg/generated/restapi/operations/server/get_rekor_version.go b/pkg/generated/restapi/operations/server/get_rekor_version.go index 0297c5202..461be3017 100644 --- a/pkg/generated/restapi/operations/server/get_rekor_version.go +++ b/pkg/generated/restapi/operations/server/get_rekor_version.go @@ -45,10 +45,10 @@ func NewGetRekorVersion(ctx *middleware.Context, handler GetRekorVersionHandler) return &GetRekorVersion{Context: ctx, Handler: handler} } -/* GetRekorVersion swagger:route GET /api/v1/version server getRekorVersion +/* + GetRekorVersion swagger:route GET /api/v1/version server getRekorVersion Get the current version of the rekor server - */ type GetRekorVersion struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/server/get_rekor_version_responses.go b/pkg/generated/restapi/operations/server/get_rekor_version_responses.go index 8845dce14..28c607895 100644 --- a/pkg/generated/restapi/operations/server/get_rekor_version_responses.go +++ b/pkg/generated/restapi/operations/server/get_rekor_version_responses.go @@ -32,7 +32,8 @@ import ( // GetRekorVersionOKCode is the HTTP code returned for type GetRekorVersionOK const GetRekorVersionOKCode int = 200 -/*GetRekorVersionOK A JSON object with the running rekor version +/* +GetRekorVersionOK A JSON object with the running rekor version swagger:response getRekorVersionOK */ @@ -73,7 +74,8 @@ func (o *GetRekorVersionOK) WriteResponse(rw http.ResponseWriter, producer runti } } -/*GetRekorVersionDefault There was an internal error in the server while processing the request +/* +GetRekorVersionDefault There was an internal error in the server while processing the request swagger:response getRekorVersionDefault */ diff --git a/pkg/generated/restapi/operations/tlog/get_log_info.go b/pkg/generated/restapi/operations/tlog/get_log_info.go index 2c7ccbcab..e5395bd77 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_info.go +++ b/pkg/generated/restapi/operations/tlog/get_log_info.go @@ -45,12 +45,12 @@ func NewGetLogInfo(ctx *middleware.Context, handler GetLogInfoHandler) *GetLogIn return &GetLogInfo{Context: ctx, Handler: handler} } -/* GetLogInfo swagger:route GET /api/v1/log tlog getLogInfo +/* + GetLogInfo swagger:route GET /api/v1/log tlog getLogInfo -Get information about the current state of the transparency log +# Get information about the current state of the transparency log Returns the current root hash and size of the merkle tree used to store the log entries. - */ type GetLogInfo struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/tlog/get_log_info_responses.go b/pkg/generated/restapi/operations/tlog/get_log_info_responses.go index 94efef292..28e747fda 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_info_responses.go +++ b/pkg/generated/restapi/operations/tlog/get_log_info_responses.go @@ -32,7 +32,8 @@ import ( // GetLogInfoOKCode is the HTTP code returned for type GetLogInfoOK const GetLogInfoOKCode int = 200 -/*GetLogInfoOK A JSON object with the root hash and tree size as properties +/* +GetLogInfoOK A JSON object with the root hash and tree size as properties swagger:response getLogInfoOK */ @@ -73,7 +74,8 @@ func (o *GetLogInfoOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pr } } -/*GetLogInfoDefault There was an internal error in the server while processing the request +/* +GetLogInfoDefault There was an internal error in the server while processing the request swagger:response getLogInfoDefault */ diff --git a/pkg/generated/restapi/operations/tlog/get_log_proof.go b/pkg/generated/restapi/operations/tlog/get_log_proof.go index c05f21197..18872a172 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_proof.go +++ b/pkg/generated/restapi/operations/tlog/get_log_proof.go @@ -45,12 +45,12 @@ func NewGetLogProof(ctx *middleware.Context, handler GetLogProofHandler) *GetLog return &GetLogProof{Context: ctx, Handler: handler} } -/* GetLogProof swagger:route GET /api/v1/log/proof tlog getLogProof +/* + GetLogProof swagger:route GET /api/v1/log/proof tlog getLogProof -Get information required to generate a consistency proof for the transparency log +# Get information required to generate a consistency proof for the transparency log Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log - */ type GetLogProof struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go b/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go index 7f842ad5c..34900c4ad 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go +++ b/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go @@ -32,7 +32,8 @@ import ( // GetLogProofOKCode is the HTTP code returned for type GetLogProofOK const GetLogProofOKCode int = 200 -/*GetLogProofOK All hashes required to compute the consistency proof +/* +GetLogProofOK All hashes required to compute the consistency proof swagger:response getLogProofOK */ @@ -76,7 +77,8 @@ func (o *GetLogProofOK) WriteResponse(rw http.ResponseWriter, producer runtime.P // GetLogProofBadRequestCode is the HTTP code returned for type GetLogProofBadRequest const GetLogProofBadRequestCode int = 400 -/*GetLogProofBadRequest The content supplied to the server was invalid +/* +GetLogProofBadRequest The content supplied to the server was invalid swagger:response getLogProofBadRequest */ @@ -117,7 +119,8 @@ func (o *GetLogProofBadRequest) WriteResponse(rw http.ResponseWriter, producer r } } -/*GetLogProofDefault There was an internal error in the server while processing the request +/* +GetLogProofDefault There was an internal error in the server while processing the request swagger:response getLogProofDefault */ diff --git a/pkg/sharding/ranges.go b/pkg/sharding/ranges.go index 891806380..5b2772251 100644 --- a/pkg/sharding/ranges.go +++ b/pkg/sharding/ranges.go @@ -38,9 +38,9 @@ type LogRanges struct { type Ranges []LogRange type LogRange struct { - TreeID int64 `yaml:"treeID"` - TreeLength int64 `yaml:"treeLength"` - EncodedPublicKey string `yaml:"encodedPublicKey"` + TreeID int64 `json:"treeID"` + TreeLength int64 `json:"treeLength"` + EncodedPublicKey string `json:"encodedPublicKey"` decodedPublicKey string } From 52220e92534c1da774b7c8a259723ad2f8a3c709 Mon Sep 17 00:00:00 2001 From: Hayden Blauzvern Date: Sun, 24 Jul 2022 21:33:11 +0000 Subject: [PATCH 2/3] remove default-consumes from Makefile Signed-off-by: Hayden Blauzvern --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 56e869968..a0d1ae1a8 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ SERVER_LDFLAGS=$(REKOR_LDFLAGS) Makefile.swagger: $(SWAGGER) $(OPENAPIDEPS) $(SWAGGER) validate openapi.yaml - $(SWAGGER) generate client -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --default-consumes application/json\;q=1 --additional-initialism=TUF + $(SWAGGER) generate client -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --additional-initialism=TUF $(SWAGGER) generate server -f openapi.yaml -q -r COPYRIGHT.txt -t pkg/generated --exclude-main -A rekor_server --flag-strategy=pflag --default-produces application/json --additional-initialism=TUF @echo "# This file is generated after swagger runs as part of the build; do not edit!" > Makefile.swagger @echo "SWAGGER_GEN=`find pkg/generated/client pkg/generated/models/ pkg/generated/restapi/ -iname '*.go' | grep -v 'configure_rekor_server' | sort -d | tr '\n' ' ' | sed 's/ $$//'`" >> Makefile.swagger; From 5b7f32de1fb9fcd2c239c33925e445f64e53386c Mon Sep 17 00:00:00 2001 From: Hayden Blauzvern Date: Wed, 27 Jul 2022 18:20:49 +0000 Subject: [PATCH 3/3] Fix comment generation Signed-off-by: Hayden Blauzvern --- .../entries/create_log_entry_parameters.go | 8 +++--- .../entries/create_log_entry_responses.go | 12 +++------ .../client/entries/entries_client.go | 13 +++++----- .../get_log_entry_by_index_parameters.go | 8 +++--- .../get_log_entry_by_index_responses.go | 9 +++---- .../get_log_entry_by_uuid_parameters.go | 8 +++--- .../get_log_entry_by_uuid_responses.go | 9 +++---- .../entries/search_log_query_parameters.go | 8 +++--- .../entries/search_log_query_responses.go | 9 +++---- pkg/generated/client/index/index_client.go | 2 +- .../client/index/search_index_parameters.go | 8 +++--- .../client/index/search_index_responses.go | 9 +++---- .../pubkey/get_public_key_parameters.go | 8 +++--- .../client/pubkey/get_public_key_responses.go | 6 ++--- pkg/generated/client/pubkey/pubkey_client.go | 4 +-- .../server/get_rekor_version_parameters.go | 8 +++--- .../server/get_rekor_version_responses.go | 6 ++--- pkg/generated/client/server/server_client.go | 2 +- .../client/tlog/get_log_info_parameters.go | 8 +++--- .../client/tlog/get_log_info_responses.go | 6 ++--- .../client/tlog/get_log_proof_parameters.go | 8 +++--- .../client/tlog/get_log_proof_responses.go | 9 +++---- pkg/generated/client/tlog/tlog_client.go | 8 +++--- pkg/generated/models/alpine_schema.go | 2 +- pkg/generated/models/alpine_v001_schema.go | 2 +- pkg/generated/models/cose_schema.go | 2 +- pkg/generated/models/cose_v001_schema.go | 2 +- pkg/generated/models/hashedrekord_schema.go | 2 +- .../models/hashedrekord_v001_schema.go | 2 +- pkg/generated/models/helm_schema.go | 2 +- pkg/generated/models/helm_v001_schema.go | 2 +- pkg/generated/models/intoto_schema.go | 2 +- pkg/generated/models/intoto_v001_schema.go | 2 +- pkg/generated/models/jar_schema.go | 2 +- pkg/generated/models/jar_v001_schema.go | 2 +- pkg/generated/models/rekord_schema.go | 2 +- pkg/generated/models/rekord_v001_schema.go | 2 +- pkg/generated/models/rfc3161_schema.go | 2 +- pkg/generated/models/rfc3161_v001_schema.go | 2 +- pkg/generated/models/rpm_schema.go | 2 +- pkg/generated/models/rpm_v001_schema.go | 2 +- pkg/generated/models/tuf_schema.go | 2 +- pkg/generated/models/tuf_v001_schema.go | 2 +- pkg/generated/restapi/doc.go | 26 +++++++++---------- .../operations/entries/create_log_entry.go | 7 ++--- .../entries/create_log_entry_responses.go | 12 +++------ .../entries/get_log_entry_by_index.go | 4 +-- .../get_log_entry_by_index_responses.go | 9 +++---- .../entries/get_log_entry_by_uuid.go | 6 ++--- .../get_log_entry_by_uuid_responses.go | 9 +++---- .../operations/entries/search_log_query.go | 4 +-- .../entries/search_log_query_responses.go | 9 +++---- .../restapi/operations/index/search_index.go | 4 +-- .../index/search_index_responses.go | 9 +++---- .../operations/pubkey/get_public_key.go | 6 ++--- .../pubkey/get_public_key_responses.go | 6 ++--- .../operations/server/get_rekor_version.go | 4 +-- .../server/get_rekor_version_responses.go | 6 ++--- .../restapi/operations/tlog/get_log_info.go | 6 ++--- .../operations/tlog/get_log_info_responses.go | 6 ++--- .../restapi/operations/tlog/get_log_proof.go | 6 ++--- .../tlog/get_log_proof_responses.go | 9 +++---- 62 files changed, 149 insertions(+), 215 deletions(-) diff --git a/pkg/generated/client/entries/create_log_entry_parameters.go b/pkg/generated/client/entries/create_log_entry_parameters.go index 481fa2bda..c5ccd2128 100644 --- a/pkg/generated/client/entries/create_log_entry_parameters.go +++ b/pkg/generated/client/entries/create_log_entry_parameters.go @@ -70,12 +70,10 @@ func NewCreateLogEntryParamsWithHTTPClient(client *http.Client) *CreateLogEntryP } } -/* -CreateLogEntryParams contains all the parameters to send to the API endpoint +/* CreateLogEntryParams contains all the parameters to send to the API endpoint + for the create log entry operation. - for the create log entry operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type CreateLogEntryParams struct { diff --git a/pkg/generated/client/entries/create_log_entry_responses.go b/pkg/generated/client/entries/create_log_entry_responses.go index e0e3ee156..135bf9ca7 100644 --- a/pkg/generated/client/entries/create_log_entry_responses.go +++ b/pkg/generated/client/entries/create_log_entry_responses.go @@ -75,8 +75,7 @@ func NewCreateLogEntryCreated() *CreateLogEntryCreated { return &CreateLogEntryCreated{} } -/* -CreateLogEntryCreated describes a response with status code 201, with default header values. +/* CreateLogEntryCreated describes a response with status code 201, with default header values. Returns the entry created in the transparency log */ @@ -135,8 +134,7 @@ func NewCreateLogEntryBadRequest() *CreateLogEntryBadRequest { return &CreateLogEntryBadRequest{} } -/* -CreateLogEntryBadRequest describes a response with status code 400, with default header values. +/* CreateLogEntryBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -168,8 +166,7 @@ func NewCreateLogEntryConflict() *CreateLogEntryConflict { return &CreateLogEntryConflict{} } -/* -CreateLogEntryConflict describes a response with status code 409, with default header values. +/* CreateLogEntryConflict describes a response with status code 409, with default header values. The request conflicts with the current state of the transparency log */ @@ -216,8 +213,7 @@ func NewCreateLogEntryDefault(code int) *CreateLogEntryDefault { } } -/* -CreateLogEntryDefault describes a response with status code -1, with default header values. +/* CreateLogEntryDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/entries/entries_client.go b/pkg/generated/client/entries/entries_client.go index fe2630eaf..05c6abb92 100644 --- a/pkg/generated/client/entries/entries_client.go +++ b/pkg/generated/client/entries/entries_client.go @@ -56,9 +56,10 @@ type ClientService interface { } /* -CreateLogEntry creates an entry in the transparency log + CreateLogEntry creates an entry in the transparency log + + Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. -Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. */ func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOption) (*CreateLogEntryCreated, error) { // TODO: Validate the params before sending @@ -95,7 +96,7 @@ func (a *Client) CreateLogEntry(params *CreateLogEntryParams, opts ...ClientOpti } /* -GetLogEntryByIndex retrieves an entry and inclusion proof from the transparency log if it exists by index + GetLogEntryByIndex retrieves an entry and inclusion proof from the transparency log if it exists by index */ func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...ClientOption) (*GetLogEntryByIndexOK, error) { // TODO: Validate the params before sending @@ -132,9 +133,9 @@ func (a *Client) GetLogEntryByIndex(params *GetLogEntryByIndexParams, opts ...Cl } /* -GetLogEntryByUUID gets log entry and information required to generate an inclusion proof for the entry in the transparency log + GetLogEntryByUUID gets log entry and information required to generate an inclusion proof for the entry in the transparency log -Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log + Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log */ func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...ClientOption) (*GetLogEntryByUUIDOK, error) { // TODO: Validate the params before sending @@ -171,7 +172,7 @@ func (a *Client) GetLogEntryByUUID(params *GetLogEntryByUUIDParams, opts ...Clie } /* -SearchLogQuery searches transparency log for one or more log entries + SearchLogQuery searches transparency log for one or more log entries */ func (a *Client) SearchLogQuery(params *SearchLogQueryParams, opts ...ClientOption) (*SearchLogQueryOK, error) { // TODO: Validate the params before sending diff --git a/pkg/generated/client/entries/get_log_entry_by_index_parameters.go b/pkg/generated/client/entries/get_log_entry_by_index_parameters.go index e22522751..405dee67c 100644 --- a/pkg/generated/client/entries/get_log_entry_by_index_parameters.go +++ b/pkg/generated/client/entries/get_log_entry_by_index_parameters.go @@ -69,12 +69,10 @@ func NewGetLogEntryByIndexParamsWithHTTPClient(client *http.Client) *GetLogEntry } } -/* -GetLogEntryByIndexParams contains all the parameters to send to the API endpoint +/* GetLogEntryByIndexParams contains all the parameters to send to the API endpoint + for the get log entry by index operation. - for the get log entry by index operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type GetLogEntryByIndexParams struct { diff --git a/pkg/generated/client/entries/get_log_entry_by_index_responses.go b/pkg/generated/client/entries/get_log_entry_by_index_responses.go index fd8419e17..8b510fcad 100644 --- a/pkg/generated/client/entries/get_log_entry_by_index_responses.go +++ b/pkg/generated/client/entries/get_log_entry_by_index_responses.go @@ -68,8 +68,7 @@ func NewGetLogEntryByIndexOK() *GetLogEntryByIndexOK { return &GetLogEntryByIndexOK{} } -/* -GetLogEntryByIndexOK describes a response with status code 200, with default header values. +/* GetLogEntryByIndexOK describes a response with status code 200, with default header values. the entry in the transparency log requested along with an inclusion proof */ @@ -99,8 +98,7 @@ func NewGetLogEntryByIndexNotFound() *GetLogEntryByIndexNotFound { return &GetLogEntryByIndexNotFound{} } -/* -GetLogEntryByIndexNotFound describes a response with status code 404, with default header values. +/* GetLogEntryByIndexNotFound describes a response with status code 404, with default header values. The content requested could not be found */ @@ -123,8 +121,7 @@ func NewGetLogEntryByIndexDefault(code int) *GetLogEntryByIndexDefault { } } -/* -GetLogEntryByIndexDefault describes a response with status code -1, with default header values. +/* GetLogEntryByIndexDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go b/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go index 5c88b5265..560bee016 100644 --- a/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go +++ b/pkg/generated/client/entries/get_log_entry_by_uuid_parameters.go @@ -68,12 +68,10 @@ func NewGetLogEntryByUUIDParamsWithHTTPClient(client *http.Client) *GetLogEntryB } } -/* -GetLogEntryByUUIDParams contains all the parameters to send to the API endpoint +/* GetLogEntryByUUIDParams contains all the parameters to send to the API endpoint + for the get log entry by UUID operation. - for the get log entry by UUID operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type GetLogEntryByUUIDParams struct { diff --git a/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go b/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go index 2f800f38a..9d46b2fa4 100644 --- a/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go +++ b/pkg/generated/client/entries/get_log_entry_by_uuid_responses.go @@ -68,8 +68,7 @@ func NewGetLogEntryByUUIDOK() *GetLogEntryByUUIDOK { return &GetLogEntryByUUIDOK{} } -/* -GetLogEntryByUUIDOK describes a response with status code 200, with default header values. +/* GetLogEntryByUUIDOK describes a response with status code 200, with default header values. Information needed for a client to compute the inclusion proof */ @@ -99,8 +98,7 @@ func NewGetLogEntryByUUIDNotFound() *GetLogEntryByUUIDNotFound { return &GetLogEntryByUUIDNotFound{} } -/* -GetLogEntryByUUIDNotFound describes a response with status code 404, with default header values. +/* GetLogEntryByUUIDNotFound describes a response with status code 404, with default header values. The content requested could not be found */ @@ -123,8 +121,7 @@ func NewGetLogEntryByUUIDDefault(code int) *GetLogEntryByUUIDDefault { } } -/* -GetLogEntryByUUIDDefault describes a response with status code -1, with default header values. +/* GetLogEntryByUUIDDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/entries/search_log_query_parameters.go b/pkg/generated/client/entries/search_log_query_parameters.go index ed158ce23..459f1208e 100644 --- a/pkg/generated/client/entries/search_log_query_parameters.go +++ b/pkg/generated/client/entries/search_log_query_parameters.go @@ -70,12 +70,10 @@ func NewSearchLogQueryParamsWithHTTPClient(client *http.Client) *SearchLogQueryP } } -/* -SearchLogQueryParams contains all the parameters to send to the API endpoint +/* SearchLogQueryParams contains all the parameters to send to the API endpoint + for the search log query operation. - for the search log query operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type SearchLogQueryParams struct { diff --git a/pkg/generated/client/entries/search_log_query_responses.go b/pkg/generated/client/entries/search_log_query_responses.go index 6107ec807..c459c0cce 100644 --- a/pkg/generated/client/entries/search_log_query_responses.go +++ b/pkg/generated/client/entries/search_log_query_responses.go @@ -68,8 +68,7 @@ func NewSearchLogQueryOK() *SearchLogQueryOK { return &SearchLogQueryOK{} } -/* -SearchLogQueryOK describes a response with status code 200, with default header values. +/* SearchLogQueryOK describes a response with status code 200, with default header values. Returns zero or more entries from the transparency log, according to how many were included in request query */ @@ -99,8 +98,7 @@ func NewSearchLogQueryBadRequest() *SearchLogQueryBadRequest { return &SearchLogQueryBadRequest{} } -/* -SearchLogQueryBadRequest describes a response with status code 400, with default header values. +/* SearchLogQueryBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -134,8 +132,7 @@ func NewSearchLogQueryDefault(code int) *SearchLogQueryDefault { } } -/* -SearchLogQueryDefault describes a response with status code -1, with default header values. +/* SearchLogQueryDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/index/index_client.go b/pkg/generated/client/index/index_client.go index 35964c0d6..f80b04afb 100644 --- a/pkg/generated/client/index/index_client.go +++ b/pkg/generated/client/index/index_client.go @@ -50,7 +50,7 @@ type ClientService interface { } /* -SearchIndex searches index by entry metadata + SearchIndex searches index by entry metadata */ func (a *Client) SearchIndex(params *SearchIndexParams, opts ...ClientOption) (*SearchIndexOK, error) { // TODO: Validate the params before sending diff --git a/pkg/generated/client/index/search_index_parameters.go b/pkg/generated/client/index/search_index_parameters.go index c1694193e..d54879b0f 100644 --- a/pkg/generated/client/index/search_index_parameters.go +++ b/pkg/generated/client/index/search_index_parameters.go @@ -70,12 +70,10 @@ func NewSearchIndexParamsWithHTTPClient(client *http.Client) *SearchIndexParams } } -/* -SearchIndexParams contains all the parameters to send to the API endpoint +/* SearchIndexParams contains all the parameters to send to the API endpoint + for the search index operation. - for the search index operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type SearchIndexParams struct { diff --git a/pkg/generated/client/index/search_index_responses.go b/pkg/generated/client/index/search_index_responses.go index 34d4d9712..587a93817 100644 --- a/pkg/generated/client/index/search_index_responses.go +++ b/pkg/generated/client/index/search_index_responses.go @@ -68,8 +68,7 @@ func NewSearchIndexOK() *SearchIndexOK { return &SearchIndexOK{} } -/* -SearchIndexOK describes a response with status code 200, with default header values. +/* SearchIndexOK describes a response with status code 200, with default header values. Returns zero or more entry UUIDs from the transparency log based on search query */ @@ -99,8 +98,7 @@ func NewSearchIndexBadRequest() *SearchIndexBadRequest { return &SearchIndexBadRequest{} } -/* -SearchIndexBadRequest describes a response with status code 400, with default header values. +/* SearchIndexBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -134,8 +132,7 @@ func NewSearchIndexDefault(code int) *SearchIndexDefault { } } -/* -SearchIndexDefault describes a response with status code -1, with default header values. +/* SearchIndexDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/pubkey/get_public_key_parameters.go b/pkg/generated/client/pubkey/get_public_key_parameters.go index b4248c933..d878ea00d 100644 --- a/pkg/generated/client/pubkey/get_public_key_parameters.go +++ b/pkg/generated/client/pubkey/get_public_key_parameters.go @@ -68,12 +68,10 @@ func NewGetPublicKeyParamsWithHTTPClient(client *http.Client) *GetPublicKeyParam } } -/* -GetPublicKeyParams contains all the parameters to send to the API endpoint +/* GetPublicKeyParams contains all the parameters to send to the API endpoint + for the get public key operation. - for the get public key operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type GetPublicKeyParams struct { diff --git a/pkg/generated/client/pubkey/get_public_key_responses.go b/pkg/generated/client/pubkey/get_public_key_responses.go index babe73ca0..10f69739f 100644 --- a/pkg/generated/client/pubkey/get_public_key_responses.go +++ b/pkg/generated/client/pubkey/get_public_key_responses.go @@ -62,8 +62,7 @@ func NewGetPublicKeyOK() *GetPublicKeyOK { return &GetPublicKeyOK{} } -/* -GetPublicKeyOK describes a response with status code 200, with default header values. +/* GetPublicKeyOK describes a response with status code 200, with default header values. The public key */ @@ -95,8 +94,7 @@ func NewGetPublicKeyDefault(code int) *GetPublicKeyDefault { } } -/* -GetPublicKeyDefault describes a response with status code -1, with default header values. +/* GetPublicKeyDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/pubkey/pubkey_client.go b/pkg/generated/client/pubkey/pubkey_client.go index 714d2de26..0f780ad9b 100644 --- a/pkg/generated/client/pubkey/pubkey_client.go +++ b/pkg/generated/client/pubkey/pubkey_client.go @@ -50,9 +50,9 @@ type ClientService interface { } /* -GetPublicKey retrieves the public key that can be used to validate the signed tree head + GetPublicKey retrieves the public key that can be used to validate the signed tree head -Returns the public key that can be used to validate the signed tree head + Returns the public key that can be used to validate the signed tree head */ func (a *Client) GetPublicKey(params *GetPublicKeyParams, opts ...ClientOption) (*GetPublicKeyOK, error) { // TODO: Validate the params before sending diff --git a/pkg/generated/client/server/get_rekor_version_parameters.go b/pkg/generated/client/server/get_rekor_version_parameters.go index fd4e30c2b..419217f70 100644 --- a/pkg/generated/client/server/get_rekor_version_parameters.go +++ b/pkg/generated/client/server/get_rekor_version_parameters.go @@ -68,12 +68,10 @@ func NewGetRekorVersionParamsWithHTTPClient(client *http.Client) *GetRekorVersio } } -/* -GetRekorVersionParams contains all the parameters to send to the API endpoint +/* GetRekorVersionParams contains all the parameters to send to the API endpoint + for the get rekor version operation. - for the get rekor version operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type GetRekorVersionParams struct { timeout time.Duration diff --git a/pkg/generated/client/server/get_rekor_version_responses.go b/pkg/generated/client/server/get_rekor_version_responses.go index 4c84daf90..fe165eae3 100644 --- a/pkg/generated/client/server/get_rekor_version_responses.go +++ b/pkg/generated/client/server/get_rekor_version_responses.go @@ -62,8 +62,7 @@ func NewGetRekorVersionOK() *GetRekorVersionOK { return &GetRekorVersionOK{} } -/* -GetRekorVersionOK describes a response with status code 200, with default header values. +/* GetRekorVersionOK describes a response with status code 200, with default header values. A JSON object with the running rekor version */ @@ -97,8 +96,7 @@ func NewGetRekorVersionDefault(code int) *GetRekorVersionDefault { } } -/* -GetRekorVersionDefault describes a response with status code -1, with default header values. +/* GetRekorVersionDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/server/server_client.go b/pkg/generated/client/server/server_client.go index fb7a6222f..f48e55062 100644 --- a/pkg/generated/client/server/server_client.go +++ b/pkg/generated/client/server/server_client.go @@ -50,7 +50,7 @@ type ClientService interface { } /* -GetRekorVersion gets the current version of the rekor server + GetRekorVersion gets the current version of the rekor server */ func (a *Client) GetRekorVersion(params *GetRekorVersionParams, opts ...ClientOption) (*GetRekorVersionOK, error) { // TODO: Validate the params before sending diff --git a/pkg/generated/client/tlog/get_log_info_parameters.go b/pkg/generated/client/tlog/get_log_info_parameters.go index e0ae2cdd3..f051485ae 100644 --- a/pkg/generated/client/tlog/get_log_info_parameters.go +++ b/pkg/generated/client/tlog/get_log_info_parameters.go @@ -68,12 +68,10 @@ func NewGetLogInfoParamsWithHTTPClient(client *http.Client) *GetLogInfoParams { } } -/* -GetLogInfoParams contains all the parameters to send to the API endpoint +/* GetLogInfoParams contains all the parameters to send to the API endpoint + for the get log info operation. - for the get log info operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type GetLogInfoParams struct { timeout time.Duration diff --git a/pkg/generated/client/tlog/get_log_info_responses.go b/pkg/generated/client/tlog/get_log_info_responses.go index 7d6d15405..d8157506a 100644 --- a/pkg/generated/client/tlog/get_log_info_responses.go +++ b/pkg/generated/client/tlog/get_log_info_responses.go @@ -62,8 +62,7 @@ func NewGetLogInfoOK() *GetLogInfoOK { return &GetLogInfoOK{} } -/* -GetLogInfoOK describes a response with status code 200, with default header values. +/* GetLogInfoOK describes a response with status code 200, with default header values. A JSON object with the root hash and tree size as properties */ @@ -97,8 +96,7 @@ func NewGetLogInfoDefault(code int) *GetLogInfoDefault { } } -/* -GetLogInfoDefault describes a response with status code -1, with default header values. +/* GetLogInfoDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/tlog/get_log_proof_parameters.go b/pkg/generated/client/tlog/get_log_proof_parameters.go index 2b21ad887..8d504b6cf 100644 --- a/pkg/generated/client/tlog/get_log_proof_parameters.go +++ b/pkg/generated/client/tlog/get_log_proof_parameters.go @@ -69,12 +69,10 @@ func NewGetLogProofParamsWithHTTPClient(client *http.Client) *GetLogProofParams } } -/* -GetLogProofParams contains all the parameters to send to the API endpoint +/* GetLogProofParams contains all the parameters to send to the API endpoint + for the get log proof operation. - for the get log proof operation. - - Typically these are written to a http.Request. + Typically these are written to a http.Request. */ type GetLogProofParams struct { diff --git a/pkg/generated/client/tlog/get_log_proof_responses.go b/pkg/generated/client/tlog/get_log_proof_responses.go index 2ec83fcaf..76ebadb10 100644 --- a/pkg/generated/client/tlog/get_log_proof_responses.go +++ b/pkg/generated/client/tlog/get_log_proof_responses.go @@ -68,8 +68,7 @@ func NewGetLogProofOK() *GetLogProofOK { return &GetLogProofOK{} } -/* -GetLogProofOK describes a response with status code 200, with default header values. +/* GetLogProofOK describes a response with status code 200, with default header values. All hashes required to compute the consistency proof */ @@ -101,8 +100,7 @@ func NewGetLogProofBadRequest() *GetLogProofBadRequest { return &GetLogProofBadRequest{} } -/* -GetLogProofBadRequest describes a response with status code 400, with default header values. +/* GetLogProofBadRequest describes a response with status code 400, with default header values. The content supplied to the server was invalid */ @@ -136,8 +134,7 @@ func NewGetLogProofDefault(code int) *GetLogProofDefault { } } -/* -GetLogProofDefault describes a response with status code -1, with default header values. +/* GetLogProofDefault describes a response with status code -1, with default header values. There was an internal error in the server while processing the request */ diff --git a/pkg/generated/client/tlog/tlog_client.go b/pkg/generated/client/tlog/tlog_client.go index f53f6c7f8..7fd8ffa19 100644 --- a/pkg/generated/client/tlog/tlog_client.go +++ b/pkg/generated/client/tlog/tlog_client.go @@ -52,9 +52,9 @@ type ClientService interface { } /* -GetLogInfo gets information about the current state of the transparency log + GetLogInfo gets information about the current state of the transparency log -Returns the current root hash and size of the merkle tree used to store the log entries. + Returns the current root hash and size of the merkle tree used to store the log entries. */ func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*GetLogInfoOK, error) { // TODO: Validate the params before sending @@ -91,9 +91,9 @@ func (a *Client) GetLogInfo(params *GetLogInfoParams, opts ...ClientOption) (*Ge } /* -GetLogProof gets information required to generate a consistency proof for the transparency log + GetLogProof gets information required to generate a consistency proof for the transparency log -Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log + Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log */ func (a *Client) GetLogProof(params *GetLogProofParams, opts ...ClientOption) (*GetLogProofOK, error) { // TODO: Validate the params before sending diff --git a/pkg/generated/models/alpine_schema.go b/pkg/generated/models/alpine_schema.go index edd25408b..49dd12b6b 100644 --- a/pkg/generated/models/alpine_schema.go +++ b/pkg/generated/models/alpine_schema.go @@ -23,7 +23,7 @@ package models // AlpineSchema Alpine Package Schema // -// # Schema for Alpine package objects +// Schema for Alpine package objects // // swagger:model alpineSchema type AlpineSchema interface{} diff --git a/pkg/generated/models/alpine_v001_schema.go b/pkg/generated/models/alpine_v001_schema.go index 6cf1181b0..999a48697 100644 --- a/pkg/generated/models/alpine_v001_schema.go +++ b/pkg/generated/models/alpine_v001_schema.go @@ -33,7 +33,7 @@ import ( // AlpineV001Schema Alpine v0.0.1 Schema // -// # Schema for Alpine Package entries +// Schema for Alpine Package entries // // swagger:model alpineV001Schema type AlpineV001Schema struct { diff --git a/pkg/generated/models/cose_schema.go b/pkg/generated/models/cose_schema.go index e653f2202..1d4f0dca1 100644 --- a/pkg/generated/models/cose_schema.go +++ b/pkg/generated/models/cose_schema.go @@ -23,7 +23,7 @@ package models // CoseSchema COSE Schema // -// # COSE for Rekord objects +// COSE for Rekord objects // // swagger:model coseSchema type CoseSchema interface{} diff --git a/pkg/generated/models/cose_v001_schema.go b/pkg/generated/models/cose_v001_schema.go index ea7f467da..caadb44d4 100644 --- a/pkg/generated/models/cose_v001_schema.go +++ b/pkg/generated/models/cose_v001_schema.go @@ -33,7 +33,7 @@ import ( // CoseV001Schema cose v0.0.1 Schema // -// # Schema for cose object +// Schema for cose object // // swagger:model coseV001Schema type CoseV001Schema struct { diff --git a/pkg/generated/models/hashedrekord_schema.go b/pkg/generated/models/hashedrekord_schema.go index 387a9392b..49d5831f8 100644 --- a/pkg/generated/models/hashedrekord_schema.go +++ b/pkg/generated/models/hashedrekord_schema.go @@ -23,7 +23,7 @@ package models // HashedrekordSchema Rekor Schema // -// # Schema for Rekord objects +// Schema for Rekord objects // // swagger:model hashedrekordSchema type HashedrekordSchema interface{} diff --git a/pkg/generated/models/hashedrekord_v001_schema.go b/pkg/generated/models/hashedrekord_v001_schema.go index 1a2dd312f..50fd24827 100644 --- a/pkg/generated/models/hashedrekord_v001_schema.go +++ b/pkg/generated/models/hashedrekord_v001_schema.go @@ -33,7 +33,7 @@ import ( // HashedrekordV001Schema Hashed Rekor v0.0.1 Schema // -// # Schema for Hashed Rekord object +// Schema for Hashed Rekord object // // swagger:model hashedrekordV001Schema type HashedrekordV001Schema struct { diff --git a/pkg/generated/models/helm_schema.go b/pkg/generated/models/helm_schema.go index 0ab87df9c..a6981eb63 100644 --- a/pkg/generated/models/helm_schema.go +++ b/pkg/generated/models/helm_schema.go @@ -23,7 +23,7 @@ package models // HelmSchema Helm Schema // -// # Schema for Helm objects +// Schema for Helm objects // // swagger:model helmSchema type HelmSchema interface{} diff --git a/pkg/generated/models/helm_v001_schema.go b/pkg/generated/models/helm_v001_schema.go index e0942574b..1512dad32 100644 --- a/pkg/generated/models/helm_v001_schema.go +++ b/pkg/generated/models/helm_v001_schema.go @@ -33,7 +33,7 @@ import ( // HelmV001Schema Helm v0.0.1 Schema // -// # Schema for Helm object +// Schema for Helm object // // swagger:model helmV001Schema type HelmV001Schema struct { diff --git a/pkg/generated/models/intoto_schema.go b/pkg/generated/models/intoto_schema.go index a7fdaa6a6..3533f9d59 100644 --- a/pkg/generated/models/intoto_schema.go +++ b/pkg/generated/models/intoto_schema.go @@ -23,7 +23,7 @@ package models // IntotoSchema Intoto Schema // -// # Intoto for Rekord objects +// Intoto for Rekord objects // // swagger:model intotoSchema type IntotoSchema interface{} diff --git a/pkg/generated/models/intoto_v001_schema.go b/pkg/generated/models/intoto_v001_schema.go index dffbecd33..e43e699f7 100644 --- a/pkg/generated/models/intoto_v001_schema.go +++ b/pkg/generated/models/intoto_v001_schema.go @@ -33,7 +33,7 @@ import ( // IntotoV001Schema intoto v0.0.1 Schema // -// # Schema for intoto object +// Schema for intoto object // // swagger:model intotoV001Schema type IntotoV001Schema struct { diff --git a/pkg/generated/models/jar_schema.go b/pkg/generated/models/jar_schema.go index e7b9a590e..d45c53da7 100644 --- a/pkg/generated/models/jar_schema.go +++ b/pkg/generated/models/jar_schema.go @@ -23,7 +23,7 @@ package models // JarSchema JAR Schema // -// # Schema for JAR objects +// Schema for JAR objects // // swagger:model jarSchema type JarSchema interface{} diff --git a/pkg/generated/models/jar_v001_schema.go b/pkg/generated/models/jar_v001_schema.go index 7a49b3e2e..24f6d3b2b 100644 --- a/pkg/generated/models/jar_v001_schema.go +++ b/pkg/generated/models/jar_v001_schema.go @@ -33,7 +33,7 @@ import ( // JarV001Schema JAR v0.0.1 Schema // -// # Schema for JAR entries +// Schema for JAR entries // // swagger:model jarV001Schema type JarV001Schema struct { diff --git a/pkg/generated/models/rekord_schema.go b/pkg/generated/models/rekord_schema.go index e85442ae9..7bf278330 100644 --- a/pkg/generated/models/rekord_schema.go +++ b/pkg/generated/models/rekord_schema.go @@ -23,7 +23,7 @@ package models // RekordSchema Rekor Schema // -// # Schema for Rekord objects +// Schema for Rekord objects // // swagger:model rekordSchema type RekordSchema interface{} diff --git a/pkg/generated/models/rekord_v001_schema.go b/pkg/generated/models/rekord_v001_schema.go index 3d0446a5b..ddc6ec290 100644 --- a/pkg/generated/models/rekord_v001_schema.go +++ b/pkg/generated/models/rekord_v001_schema.go @@ -33,7 +33,7 @@ import ( // RekordV001Schema Rekor v0.0.1 Schema // -// # Schema for Rekord object +// Schema for Rekord object // // swagger:model rekordV001Schema type RekordV001Schema struct { diff --git a/pkg/generated/models/rfc3161_schema.go b/pkg/generated/models/rfc3161_schema.go index 826013a28..90667a4aa 100644 --- a/pkg/generated/models/rfc3161_schema.go +++ b/pkg/generated/models/rfc3161_schema.go @@ -23,7 +23,7 @@ package models // Rfc3161Schema Timestamp Schema // -// # Schema for RFC 3161 timestamp objects +// Schema for RFC 3161 timestamp objects // // swagger:model rfc3161Schema type Rfc3161Schema interface{} diff --git a/pkg/generated/models/rfc3161_v001_schema.go b/pkg/generated/models/rfc3161_v001_schema.go index fe668412d..49f317a76 100644 --- a/pkg/generated/models/rfc3161_v001_schema.go +++ b/pkg/generated/models/rfc3161_v001_schema.go @@ -32,7 +32,7 @@ import ( // Rfc3161V001Schema Timestamp v0.0.1 Schema // -// # Schema for RFC3161 entries +// Schema for RFC3161 entries // // swagger:model rfc3161V001Schema type Rfc3161V001Schema struct { diff --git a/pkg/generated/models/rpm_schema.go b/pkg/generated/models/rpm_schema.go index 5cb378366..0304bbe77 100644 --- a/pkg/generated/models/rpm_schema.go +++ b/pkg/generated/models/rpm_schema.go @@ -23,7 +23,7 @@ package models // RpmSchema RPM Schema // -// # Schema for RPM objects +// Schema for RPM objects // // swagger:model rpmSchema type RpmSchema interface{} diff --git a/pkg/generated/models/rpm_v001_schema.go b/pkg/generated/models/rpm_v001_schema.go index 82a75c1de..6f3cb07c9 100644 --- a/pkg/generated/models/rpm_v001_schema.go +++ b/pkg/generated/models/rpm_v001_schema.go @@ -33,7 +33,7 @@ import ( // RpmV001Schema RPM v0.0.1 Schema // -// # Schema for RPM entries +// Schema for RPM entries // // swagger:model rpmV001Schema type RpmV001Schema struct { diff --git a/pkg/generated/models/tuf_schema.go b/pkg/generated/models/tuf_schema.go index 37dca8b68..425a546ec 100644 --- a/pkg/generated/models/tuf_schema.go +++ b/pkg/generated/models/tuf_schema.go @@ -23,7 +23,7 @@ package models // TUFSchema TUF Schema // -// # Schema for TUF metadata objects +// Schema for TUF metadata objects // // swagger:model tufSchema type TUFSchema interface{} diff --git a/pkg/generated/models/tuf_v001_schema.go b/pkg/generated/models/tuf_v001_schema.go index f8bf4b020..d015607ff 100644 --- a/pkg/generated/models/tuf_v001_schema.go +++ b/pkg/generated/models/tuf_v001_schema.go @@ -32,7 +32,7 @@ import ( // TUFV001Schema TUF v0.0.1 Schema // -// # Schema for TUF metadata entries +// Schema for TUF metadata entries // // swagger:model tufV001Schema type TUFV001Schema struct { diff --git a/pkg/generated/restapi/doc.go b/pkg/generated/restapi/doc.go index 8b8735f1c..72dfdc654 100644 --- a/pkg/generated/restapi/doc.go +++ b/pkg/generated/restapi/doc.go @@ -17,19 +17,19 @@ // Package restapi Rekor // -// Rekor is a cryptographically secure, immutable transparency log for signed software releases. -// Schemes: -// http -// Host: rekor.sigstore.dev -// BasePath: / -// Version: 0.0.1 -// -// Consumes: -// - application/json -// -// Produces: -// - application/x-pem-file -// - application/json +// Rekor is a cryptographically secure, immutable transparency log for signed software releases. +// Schemes: +// http +// Host: rekor.sigstore.dev +// BasePath: / +// Version: 0.0.1 +// +// Consumes: +// - application/json +// +// Produces: +// - application/x-pem-file +// - application/json // // swagger:meta package restapi diff --git a/pkg/generated/restapi/operations/entries/create_log_entry.go b/pkg/generated/restapi/operations/entries/create_log_entry.go index b95c892fb..6860514d3 100644 --- a/pkg/generated/restapi/operations/entries/create_log_entry.go +++ b/pkg/generated/restapi/operations/entries/create_log_entry.go @@ -45,12 +45,13 @@ func NewCreateLogEntry(ctx *middleware.Context, handler CreateLogEntryHandler) * return &CreateLogEntry{Context: ctx, Handler: handler} } -/* - CreateLogEntry swagger:route POST /api/v1/log/entries entries createLogEntry +/* CreateLogEntry swagger:route POST /api/v1/log/entries entries createLogEntry -# Creates an entry in the transparency log +Creates an entry in the transparency log Creates an entry in the transparency log for a detached signature, public key, and content. Items can be included in the request or fetched by the server when URLs are specified. + + */ type CreateLogEntry struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/create_log_entry_responses.go b/pkg/generated/restapi/operations/entries/create_log_entry_responses.go index 3ff2489f0..ddc2839c1 100644 --- a/pkg/generated/restapi/operations/entries/create_log_entry_responses.go +++ b/pkg/generated/restapi/operations/entries/create_log_entry_responses.go @@ -33,8 +33,7 @@ import ( // CreateLogEntryCreatedCode is the HTTP code returned for type CreateLogEntryCreated const CreateLogEntryCreatedCode int = 201 -/* -CreateLogEntryCreated Returns the entry created in the transparency log +/*CreateLogEntryCreated Returns the entry created in the transparency log swagger:response createLogEntryCreated */ @@ -125,8 +124,7 @@ func (o *CreateLogEntryCreated) WriteResponse(rw http.ResponseWriter, producer r // CreateLogEntryBadRequestCode is the HTTP code returned for type CreateLogEntryBadRequest const CreateLogEntryBadRequestCode int = 400 -/* -CreateLogEntryBadRequest The content supplied to the server was invalid +/*CreateLogEntryBadRequest The content supplied to the server was invalid swagger:response createLogEntryBadRequest */ @@ -170,8 +168,7 @@ func (o *CreateLogEntryBadRequest) WriteResponse(rw http.ResponseWriter, produce // CreateLogEntryConflictCode is the HTTP code returned for type CreateLogEntryConflict const CreateLogEntryConflictCode int = 409 -/* -CreateLogEntryConflict The request conflicts with the current state of the transparency log +/*CreateLogEntryConflict The request conflicts with the current state of the transparency log swagger:response createLogEntryConflict */ @@ -234,8 +231,7 @@ func (o *CreateLogEntryConflict) WriteResponse(rw http.ResponseWriter, producer } } -/* -CreateLogEntryDefault There was an internal error in the server while processing the request +/*CreateLogEntryDefault There was an internal error in the server while processing the request swagger:response createLogEntryDefault */ diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go index ee804e5b9..a27e5f608 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_index.go @@ -45,10 +45,10 @@ func NewGetLogEntryByIndex(ctx *middleware.Context, handler GetLogEntryByIndexHa return &GetLogEntryByIndex{Context: ctx, Handler: handler} } -/* - GetLogEntryByIndex swagger:route GET /api/v1/log/entries entries getLogEntryByIndex +/* GetLogEntryByIndex swagger:route GET /api/v1/log/entries entries getLogEntryByIndex Retrieves an entry and inclusion proof from the transparency log (if it exists) by index + */ type GetLogEntryByIndex struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go index 08d6215ec..3b14b1a36 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_index_responses.go @@ -32,8 +32,7 @@ import ( // GetLogEntryByIndexOKCode is the HTTP code returned for type GetLogEntryByIndexOK const GetLogEntryByIndexOKCode int = 200 -/* -GetLogEntryByIndexOK the entry in the transparency log requested along with an inclusion proof +/*GetLogEntryByIndexOK the entry in the transparency log requested along with an inclusion proof swagger:response getLogEntryByIndexOK */ @@ -80,8 +79,7 @@ func (o *GetLogEntryByIndexOK) WriteResponse(rw http.ResponseWriter, producer ru // GetLogEntryByIndexNotFoundCode is the HTTP code returned for type GetLogEntryByIndexNotFound const GetLogEntryByIndexNotFoundCode int = 404 -/* -GetLogEntryByIndexNotFound The content requested could not be found +/*GetLogEntryByIndexNotFound The content requested could not be found swagger:response getLogEntryByIndexNotFound */ @@ -102,8 +100,7 @@ func (o *GetLogEntryByIndexNotFound) WriteResponse(rw http.ResponseWriter, produ rw.WriteHeader(404) } -/* -GetLogEntryByIndexDefault There was an internal error in the server while processing the request +/*GetLogEntryByIndexDefault There was an internal error in the server while processing the request swagger:response getLogEntryByIndexDefault */ diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go index eb04b8693..ea40f9025 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid.go @@ -45,12 +45,12 @@ func NewGetLogEntryByUUID(ctx *middleware.Context, handler GetLogEntryByUUIDHand return &GetLogEntryByUUID{Context: ctx, Handler: handler} } -/* - GetLogEntryByUUID swagger:route GET /api/v1/log/entries/{entryUUID} entries getLogEntryByUuid +/* GetLogEntryByUUID swagger:route GET /api/v1/log/entries/{entryUUID} entries getLogEntryByUuid -# Get log entry and information required to generate an inclusion proof for the entry in the transparency log +Get log entry and information required to generate an inclusion proof for the entry in the transparency log Returns the entry, root hash, tree size, and a list of hashes that can be used to calculate proof of an entry being included in the transparency log + */ type GetLogEntryByUUID struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go index 1e45fb1cd..ccabfba23 100644 --- a/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go +++ b/pkg/generated/restapi/operations/entries/get_log_entry_by_uuid_responses.go @@ -32,8 +32,7 @@ import ( // GetLogEntryByUUIDOKCode is the HTTP code returned for type GetLogEntryByUUIDOK const GetLogEntryByUUIDOKCode int = 200 -/* -GetLogEntryByUUIDOK Information needed for a client to compute the inclusion proof +/*GetLogEntryByUUIDOK Information needed for a client to compute the inclusion proof swagger:response getLogEntryByUuidOK */ @@ -80,8 +79,7 @@ func (o *GetLogEntryByUUIDOK) WriteResponse(rw http.ResponseWriter, producer run // GetLogEntryByUUIDNotFoundCode is the HTTP code returned for type GetLogEntryByUUIDNotFound const GetLogEntryByUUIDNotFoundCode int = 404 -/* -GetLogEntryByUUIDNotFound The content requested could not be found +/*GetLogEntryByUUIDNotFound The content requested could not be found swagger:response getLogEntryByUuidNotFound */ @@ -102,8 +100,7 @@ func (o *GetLogEntryByUUIDNotFound) WriteResponse(rw http.ResponseWriter, produc rw.WriteHeader(404) } -/* -GetLogEntryByUUIDDefault There was an internal error in the server while processing the request +/*GetLogEntryByUUIDDefault There was an internal error in the server while processing the request swagger:response getLogEntryByUuidDefault */ diff --git a/pkg/generated/restapi/operations/entries/search_log_query.go b/pkg/generated/restapi/operations/entries/search_log_query.go index 343f3ec52..098e225d7 100644 --- a/pkg/generated/restapi/operations/entries/search_log_query.go +++ b/pkg/generated/restapi/operations/entries/search_log_query.go @@ -45,10 +45,10 @@ func NewSearchLogQuery(ctx *middleware.Context, handler SearchLogQueryHandler) * return &SearchLogQuery{Context: ctx, Handler: handler} } -/* - SearchLogQuery swagger:route POST /api/v1/log/entries/retrieve entries searchLogQuery +/* SearchLogQuery swagger:route POST /api/v1/log/entries/retrieve entries searchLogQuery Searches transparency log for one or more log entries + */ type SearchLogQuery struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/entries/search_log_query_responses.go b/pkg/generated/restapi/operations/entries/search_log_query_responses.go index 10d09ff2b..3694ef3d8 100644 --- a/pkg/generated/restapi/operations/entries/search_log_query_responses.go +++ b/pkg/generated/restapi/operations/entries/search_log_query_responses.go @@ -32,8 +32,7 @@ import ( // SearchLogQueryOKCode is the HTTP code returned for type SearchLogQueryOK const SearchLogQueryOKCode int = 200 -/* -SearchLogQueryOK Returns zero or more entries from the transparency log, according to how many were included in request query +/*SearchLogQueryOK Returns zero or more entries from the transparency log, according to how many were included in request query swagger:response searchLogQueryOK */ @@ -80,8 +79,7 @@ func (o *SearchLogQueryOK) WriteResponse(rw http.ResponseWriter, producer runtim // SearchLogQueryBadRequestCode is the HTTP code returned for type SearchLogQueryBadRequest const SearchLogQueryBadRequestCode int = 400 -/* -SearchLogQueryBadRequest The content supplied to the server was invalid +/*SearchLogQueryBadRequest The content supplied to the server was invalid swagger:response searchLogQueryBadRequest */ @@ -122,8 +120,7 @@ func (o *SearchLogQueryBadRequest) WriteResponse(rw http.ResponseWriter, produce } } -/* -SearchLogQueryDefault There was an internal error in the server while processing the request +/*SearchLogQueryDefault There was an internal error in the server while processing the request swagger:response searchLogQueryDefault */ diff --git a/pkg/generated/restapi/operations/index/search_index.go b/pkg/generated/restapi/operations/index/search_index.go index f3c1ac6ca..5848525c2 100644 --- a/pkg/generated/restapi/operations/index/search_index.go +++ b/pkg/generated/restapi/operations/index/search_index.go @@ -45,10 +45,10 @@ func NewSearchIndex(ctx *middleware.Context, handler SearchIndexHandler) *Search return &SearchIndex{Context: ctx, Handler: handler} } -/* - SearchIndex swagger:route POST /api/v1/index/retrieve index searchIndex +/* SearchIndex swagger:route POST /api/v1/index/retrieve index searchIndex Searches index by entry metadata + */ type SearchIndex struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/index/search_index_responses.go b/pkg/generated/restapi/operations/index/search_index_responses.go index 6211b99eb..4a160125d 100644 --- a/pkg/generated/restapi/operations/index/search_index_responses.go +++ b/pkg/generated/restapi/operations/index/search_index_responses.go @@ -32,8 +32,7 @@ import ( // SearchIndexOKCode is the HTTP code returned for type SearchIndexOK const SearchIndexOKCode int = 200 -/* -SearchIndexOK Returns zero or more entry UUIDs from the transparency log based on search query +/*SearchIndexOK Returns zero or more entry UUIDs from the transparency log based on search query swagger:response searchIndexOK */ @@ -80,8 +79,7 @@ func (o *SearchIndexOK) WriteResponse(rw http.ResponseWriter, producer runtime.P // SearchIndexBadRequestCode is the HTTP code returned for type SearchIndexBadRequest const SearchIndexBadRequestCode int = 400 -/* -SearchIndexBadRequest The content supplied to the server was invalid +/*SearchIndexBadRequest The content supplied to the server was invalid swagger:response searchIndexBadRequest */ @@ -122,8 +120,7 @@ func (o *SearchIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer r } } -/* -SearchIndexDefault There was an internal error in the server while processing the request +/*SearchIndexDefault There was an internal error in the server while processing the request swagger:response searchIndexDefault */ diff --git a/pkg/generated/restapi/operations/pubkey/get_public_key.go b/pkg/generated/restapi/operations/pubkey/get_public_key.go index 688c7bb36..939566b94 100644 --- a/pkg/generated/restapi/operations/pubkey/get_public_key.go +++ b/pkg/generated/restapi/operations/pubkey/get_public_key.go @@ -45,12 +45,12 @@ func NewGetPublicKey(ctx *middleware.Context, handler GetPublicKeyHandler) *GetP return &GetPublicKey{Context: ctx, Handler: handler} } -/* - GetPublicKey swagger:route GET /api/v1/log/publicKey pubkey getPublicKey +/* GetPublicKey swagger:route GET /api/v1/log/publicKey pubkey getPublicKey -# Retrieve the public key that can be used to validate the signed tree head +Retrieve the public key that can be used to validate the signed tree head Returns the public key that can be used to validate the signed tree head + */ type GetPublicKey struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go b/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go index 1cd51a9df..6ecb5bf19 100644 --- a/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go +++ b/pkg/generated/restapi/operations/pubkey/get_public_key_responses.go @@ -32,8 +32,7 @@ import ( // GetPublicKeyOKCode is the HTTP code returned for type GetPublicKeyOK const GetPublicKeyOKCode int = 200 -/* -GetPublicKeyOK The public key +/*GetPublicKeyOK The public key swagger:response getPublicKeyOK */ @@ -72,8 +71,7 @@ func (o *GetPublicKeyOK) WriteResponse(rw http.ResponseWriter, producer runtime. } } -/* -GetPublicKeyDefault There was an internal error in the server while processing the request +/*GetPublicKeyDefault There was an internal error in the server while processing the request swagger:response getPublicKeyDefault */ diff --git a/pkg/generated/restapi/operations/server/get_rekor_version.go b/pkg/generated/restapi/operations/server/get_rekor_version.go index 461be3017..0297c5202 100644 --- a/pkg/generated/restapi/operations/server/get_rekor_version.go +++ b/pkg/generated/restapi/operations/server/get_rekor_version.go @@ -45,10 +45,10 @@ func NewGetRekorVersion(ctx *middleware.Context, handler GetRekorVersionHandler) return &GetRekorVersion{Context: ctx, Handler: handler} } -/* - GetRekorVersion swagger:route GET /api/v1/version server getRekorVersion +/* GetRekorVersion swagger:route GET /api/v1/version server getRekorVersion Get the current version of the rekor server + */ type GetRekorVersion struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/server/get_rekor_version_responses.go b/pkg/generated/restapi/operations/server/get_rekor_version_responses.go index 28c607895..8845dce14 100644 --- a/pkg/generated/restapi/operations/server/get_rekor_version_responses.go +++ b/pkg/generated/restapi/operations/server/get_rekor_version_responses.go @@ -32,8 +32,7 @@ import ( // GetRekorVersionOKCode is the HTTP code returned for type GetRekorVersionOK const GetRekorVersionOKCode int = 200 -/* -GetRekorVersionOK A JSON object with the running rekor version +/*GetRekorVersionOK A JSON object with the running rekor version swagger:response getRekorVersionOK */ @@ -74,8 +73,7 @@ func (o *GetRekorVersionOK) WriteResponse(rw http.ResponseWriter, producer runti } } -/* -GetRekorVersionDefault There was an internal error in the server while processing the request +/*GetRekorVersionDefault There was an internal error in the server while processing the request swagger:response getRekorVersionDefault */ diff --git a/pkg/generated/restapi/operations/tlog/get_log_info.go b/pkg/generated/restapi/operations/tlog/get_log_info.go index e5395bd77..2c7ccbcab 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_info.go +++ b/pkg/generated/restapi/operations/tlog/get_log_info.go @@ -45,12 +45,12 @@ func NewGetLogInfo(ctx *middleware.Context, handler GetLogInfoHandler) *GetLogIn return &GetLogInfo{Context: ctx, Handler: handler} } -/* - GetLogInfo swagger:route GET /api/v1/log tlog getLogInfo +/* GetLogInfo swagger:route GET /api/v1/log tlog getLogInfo -# Get information about the current state of the transparency log +Get information about the current state of the transparency log Returns the current root hash and size of the merkle tree used to store the log entries. + */ type GetLogInfo struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/tlog/get_log_info_responses.go b/pkg/generated/restapi/operations/tlog/get_log_info_responses.go index 28e747fda..94efef292 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_info_responses.go +++ b/pkg/generated/restapi/operations/tlog/get_log_info_responses.go @@ -32,8 +32,7 @@ import ( // GetLogInfoOKCode is the HTTP code returned for type GetLogInfoOK const GetLogInfoOKCode int = 200 -/* -GetLogInfoOK A JSON object with the root hash and tree size as properties +/*GetLogInfoOK A JSON object with the root hash and tree size as properties swagger:response getLogInfoOK */ @@ -74,8 +73,7 @@ func (o *GetLogInfoOK) WriteResponse(rw http.ResponseWriter, producer runtime.Pr } } -/* -GetLogInfoDefault There was an internal error in the server while processing the request +/*GetLogInfoDefault There was an internal error in the server while processing the request swagger:response getLogInfoDefault */ diff --git a/pkg/generated/restapi/operations/tlog/get_log_proof.go b/pkg/generated/restapi/operations/tlog/get_log_proof.go index 18872a172..c05f21197 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_proof.go +++ b/pkg/generated/restapi/operations/tlog/get_log_proof.go @@ -45,12 +45,12 @@ func NewGetLogProof(ctx *middleware.Context, handler GetLogProofHandler) *GetLog return &GetLogProof{Context: ctx, Handler: handler} } -/* - GetLogProof swagger:route GET /api/v1/log/proof tlog getLogProof +/* GetLogProof swagger:route GET /api/v1/log/proof tlog getLogProof -# Get information required to generate a consistency proof for the transparency log +Get information required to generate a consistency proof for the transparency log Returns a list of hashes for specified tree sizes that can be used to confirm the consistency of the transparency log + */ type GetLogProof struct { Context *middleware.Context diff --git a/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go b/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go index 34900c4ad..7f842ad5c 100644 --- a/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go +++ b/pkg/generated/restapi/operations/tlog/get_log_proof_responses.go @@ -32,8 +32,7 @@ import ( // GetLogProofOKCode is the HTTP code returned for type GetLogProofOK const GetLogProofOKCode int = 200 -/* -GetLogProofOK All hashes required to compute the consistency proof +/*GetLogProofOK All hashes required to compute the consistency proof swagger:response getLogProofOK */ @@ -77,8 +76,7 @@ func (o *GetLogProofOK) WriteResponse(rw http.ResponseWriter, producer runtime.P // GetLogProofBadRequestCode is the HTTP code returned for type GetLogProofBadRequest const GetLogProofBadRequestCode int = 400 -/* -GetLogProofBadRequest The content supplied to the server was invalid +/*GetLogProofBadRequest The content supplied to the server was invalid swagger:response getLogProofBadRequest */ @@ -119,8 +117,7 @@ func (o *GetLogProofBadRequest) WriteResponse(rw http.ResponseWriter, producer r } } -/* -GetLogProofDefault There was an internal error in the server while processing the request +/*GetLogProofDefault There was an internal error in the server while processing the request swagger:response getLogProofDefault */