Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

since and until should be epoch time #38845

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@trajano
Copy link

commented Mar 9, 2019

- What I did

Tried using ISO Date time format but it failed with the API call. The error looked like it was doing a string to integer conversion. I surmised that this is epoch time.

- How I did it
Changed the documentation

- How to verify it

- Description for the changelog

Corrected since and until API documentation to match implementation

- A picture of a cute animal (not mandatory but encouraged)

@GordonTheTurtle

This comment has been minimized.

Copy link

commented Mar 9, 2019

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "patch-1" git@github.com:trajano/moby.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@trajano

This comment has been minimized.

Copy link
Author

commented Mar 10, 2019

Odd I thought if I make the changes directly on Github it will automatically be signed. It does show verified already.

@trajano trajano force-pushed the trajano:patch-1 branch from 408b90a to 8cf398e Mar 10, 2019

@GordonTheTurtle GordonTheTurtle removed the dco/no label Mar 10, 2019

Show resolved Hide resolved api/swagger.yaml Outdated
@trajano

This comment has been minimized.

Copy link
Author

commented Mar 12, 2019

Odd I pushed more changes to my branch but it's not updating this PR.

@trajano trajano force-pushed the trajano:patch-1 branch from e478e3e to 034eba4 Mar 12, 2019

@codecov

This comment has been minimized.

Copy link

commented Mar 12, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@36d2c8b). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #38845   +/-   ##
=========================================
  Coverage          ?   36.45%           
=========================================
  Files             ?      613           
  Lines             ?    45814           
  Branches          ?        0           
=========================================
  Hits              ?    16703           
  Misses            ?    26828           
  Partials          ?     2283
@thaJeztah
Copy link
Member

left a comment

changes LGTM (thanks!)

could you squash your commits, so that there's only a single commit in this PR?

since and until should be UNIX timestamp
UNIX timestamps can have nanoseconds
Created separate definition that can be reused elsewhere

Signed-off-by: Archimedes Trajano <developer@trajano.net>

@trajano trajano force-pushed the trajano:patch-1 branch from 034eba4 to e5f6ab9 Mar 12, 2019

@thaJeztah

This comment has been minimized.

Copy link
Member

commented Mar 19, 2019

hm.. looks like the swagger doesn't validate. Perhaps we should simplify it somehow 😕

16:17:53 The swagger spec at "api/swagger.yaml" is invalid against swagger specification 2.0. see errors :
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - paths./events.get.parameters.example in body is a forbidden property
16:17:53 - paths./events.get.parameters.in in body should be one of [body]
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - paths./events.get.parameters.example in body is a forbidden property
16:17:53 - paths./events.get.parameters.in in body should be one of [body]
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - paths./events.get.parameters.example in body is a forbidden property
16:17:53 - paths./events.get.parameters.in in body should be one of [body]
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - must validate one and only one schema (oneOf)
16:17:53 - paths./events.get.parameters.example in body is a forbidden property
16:17:53 - paths./events.get.parameters.in in body should be one of [body]
16:17:53 - definitions.UnixTimestampWithNanos.anyOf in body is a forbidden property
@trajano

This comment has been minimized.

Copy link
Author

commented Mar 19, 2019

OK i can probably use number

Simplified to support swagger 2.0 validation
Signed-off-by: Archimedes Trajano <developer@trajano.net>

@trajano trajano force-pushed the trajano:patch-1 branch from b6667d4 to eedb041 Mar 19, 2019

@GordonTheTurtle GordonTheTurtle removed the dco/no label Mar 19, 2019

Fixed validation
Signed-off-by: Archimedes Trajano <developer@trajano.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.