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

Fixed task webhook docs #1700

Merged
merged 5 commits into from Feb 2, 2018
Merged

Fixed task webhook docs #1700

merged 5 commits into from Feb 2, 2018

Conversation

pschoenfelder
Copy link
Contributor

No description provided.

@@ -1194,6 +1195,14 @@ Models:
| shellRequestId | [SingularityTaskShellCommandRequestId](models.md#model-SingularityTaskShellCommandRequestId) | optional | |


## <a name="model-SingularityTaskWebhook"></a> SingularityTaskWebhook
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@@ -14,10 +15,12 @@ public SingularityTaskWebhook(@JsonProperty("task") SingularityTask task, @JsonP
this.taskUpdate = taskUpdate;
}

@ApiModelProperty(required=false, value="The task this webhook refers to.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

ssalinas commented Feb 2, 2018

🚢

@ssalinas ssalinas merged commit c36a192 into master Feb 2, 2018
@ssalinas ssalinas deleted the webhook_docs branch February 2, 2018 13:50
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants