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

Fixed task webhook docs #1700

Merged
merged 5 commits into from Feb 2, 2018

Conversation

Projects
None yet
2 participants
@pschoenfelder
Contributor

pschoenfelder commented Jan 29, 2018

No description provided.

Paul Schoenfelder

@pschoenfelder pschoenfelder requested a review from ssalinas Jan 29, 2018

Paul Schoenfelder
@@ -1194,6 +1195,14 @@ Models:
| shellRequestId | [SingularityTaskShellCommandRequestId](models.md#model-SingularityTaskShellCommandRequestId) | optional | |
## <a name="model-SingularityTaskWebhook"></a> SingularityTaskWebhook

This comment has been minimized.

@ssalinas

ssalinas Jan 30, 2018

Member

A quick note that everything in the apidocs folder here is auto generated by swagger for us. What you'll want to do is add swagger annotations to the object, similar to what you see here. That should get swagger to include it in the models docs for us

Paul Schoenfelder added some commits Jan 30, 2018

Paul Schoenfelder
Paul Schoenfelder
@@ -14,10 +15,12 @@ public SingularityTaskWebhook(@JsonProperty("task") SingularityTask task, @JsonP
this.taskUpdate = taskUpdate;
}
@ApiModelProperty(required=false, value="The task this webhook refers to.")

This comment has been minimized.

@ssalinas

ssalinas Jan 31, 2018

Member

Due to the fact that this is not a model returned by a specific endpoint, I don't think swagger will pick it up without an @ApiModel annotation on the class as a whole. You can test this out running something like mvn -Pbuild-swagger-documentation -DskipTests=true -B -q -fae install to generate the documentation and check if the model appears

This comment has been minimized.

@pschoenfelder

pschoenfelder Jan 31, 2018

Contributor

Hmm good catch. Even with the @ApiModel annotation it doesn't appear though. Google's not telling me much about this. I've compared against the other classes annotated with this in Singularity too and it seems okay. Any ideas?

This comment has been minimized.

@pschoenfelder

pschoenfelder Feb 1, 2018

Contributor

Update - added the link to github instead of the docs link since swagger still isn't building this even when marked with the annotation.

@ssalinas

This comment has been minimized.

Member

ssalinas commented Feb 2, 2018

🚢

@ssalinas ssalinas merged commit c36a192 into master Feb 2, 2018

2 checks passed

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

@ssalinas ssalinas deleted the webhook_docs branch Feb 2, 2018

@ssalinas ssalinas added this to the 0.19.0 milestone Feb 15, 2018

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