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

Updating the Swagger to be more accurate to address issue #1059 #1061

Merged
merged 2 commits into from Jan 28, 2019

Conversation

Projects
None yet
4 participants
@acornies
Copy link
Member

acornies commented Jan 25, 2019

Description

  • Fixed annotations and labels type and added examples
  • Added the readOnlyRootFilesystem bool
    Fixes: #1059

Motivation and Context

Swagger docs had inaccurate schema for labels and annotations

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

Tested with the Swagger Viewer VS Code plugin

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Updating the Swagger to be more accurate:
- Fixed annotations and labels type and added examples
- Added the readOnlyRootFilesystem bool

Signed-off-by: Andrew Cornies <acornies@gmail.com>
@viveksyngh
Copy link
Member

viveksyngh left a comment

LGTM may be we should use object for dictionary/hashmap?

description: An array of labels used by the back-end for making scheduling or routing decisions
type: array
items:
description: A dictionary/hashmap used by the back-end for making scheduling or routing decisions

This comment has been minimized.

@alexellis

alexellis Jan 27, 2019

Member

Perhaps we should use the word "labels" in the description? (we do for annotations)

What one word could we use instead of dictionary/hashmap? How about map?

@@ -483,6 +488,9 @@ definitions:
cpu:
type: string
example: "0.01"
readOnlyRootFilesystem:
type: boolean
description: Removes write-access from the root filesystem

This comment has been minimized.

@alexellis

alexellis Jan 27, 2019

Member

Make the root filesystem of the function read-only?

@@ -518,13 +526,20 @@ definitions:
type: string
example: node main.js
labels:
description: A dictionary/hashmap used by the back-end for making scheduling or routing decisions

This comment has been minimized.

@alexellis

alexellis Jan 27, 2019

Member

I think used by the back-end was a phrase added by one of us in the past, but it can probably be omitted from the file now for brevity.

Updated terminology:
Made description changes to be more succinct

Signed-off-by: Andrew Cornies <acornies@gmail.com>
@acornies

This comment has been minimized.

Copy link
Member Author

acornies commented Jan 28, 2019

Updated with the suggestions.

@alexellis alexellis merged commit 9ba1636 into openfaas:master Jan 28, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@alexellis

This comment has been minimized.

Copy link
Member

alexellis commented Jan 28, 2019

Merging, thank you Andrew. @noppen please could you verify the Swagger is correct and present?

@noppen

This comment has been minimized.

Copy link

noppen commented Jan 28, 2019

Merging, thank you Andrew. @noppen please could you verify the Swagger is correct and present?

That looks good to me indeed, verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment