Skip to content

Commit

Permalink
Add Swagger release v0.1.1. This closes #40 and closes #41
Browse files Browse the repository at this point in the history
  • Loading branch information
bobvanluijt committed Apr 26, 2017
1 parent bb6cede commit 1e22d13
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion restapi/configure_weaviate.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* See package.json for author and maintainer info
* Contact: @weaviate_iot / yourfriends@weaviate.com
*/
package restapi
package restapi

import (
"crypto/tls"
Expand Down
3 changes: 2 additions & 1 deletion restapi/embedded_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ func init() {
},
{
"maximum": 25000,
"type": "string",
"type": "integer",
"format": "int64",
"description": "Number of milliseconds to wait for device response before returning.",
"name": "responseAwaitMs",
"in": "query"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type WeaviateCommandsInsertParams struct {
Maximum: 25000
In: query
*/
ResponseAwaitMs *string
ResponseAwaitMs *int64
/*IP address of the site where the request originates. Use this if you want to enforce per-user limits.
In: query
*/
Expand Down Expand Up @@ -325,7 +325,11 @@ func (o *WeaviateCommandsInsertParams) bindResponseAwaitMs(rawData []string, has
return nil
}

o.ResponseAwaitMs = &raw
value, err := swag.ConvertInt64(raw)
if err != nil {
return errors.InvalidType("responseAwaitMs", "query", "int64", raw)
}
o.ResponseAwaitMs = &value

if err := o.validateResponseAwaitMs(formats); err != nil {
return err
Expand All @@ -336,7 +340,7 @@ func (o *WeaviateCommandsInsertParams) bindResponseAwaitMs(rawData []string, has

func (o *WeaviateCommandsInsertParams) validateResponseAwaitMs(formats strfmt.Registry) error {

if err := validate.Maximum("responseAwaitMs", "query", float64(*o.ResponseAwaitMs), 25000, false); err != nil {
if err := validate.MaximumInt("responseAwaitMs", "query", int64(*o.ResponseAwaitMs), 25000, false); err != nil {
return err
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type WeaviateCommandsInsertURL struct {
OauthToken *string
PrettyPrint *bool
QuotaUser *string
ResponseAwaitMs *string
ResponseAwaitMs *int64
UserIP *string

_basePath string
Expand Down Expand Up @@ -137,7 +137,7 @@ func (o *WeaviateCommandsInsertURL) Build() (*url.URL, error) {

var responseAwaitMs string
if o.ResponseAwaitMs != nil {
responseAwaitMs = *o.ResponseAwaitMs
responseAwaitMs = swag.FormatInt64(*o.ResponseAwaitMs)
}
if responseAwaitMs != "" {
qs.Set("responseAwaitMs", responseAwaitMs)
Expand Down

0 comments on commit 1e22d13

Please sign in to comment.