Skip to content

chore(sample): Improve WebApiSample, adding SwaggerUI, fix invalid cast from JObject #290

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

Merged
merged 2 commits into from
May 12, 2019

Conversation

hieuxlu
Copy link
Contributor

@hieuxlu hieuxlu commented Mar 26, 2019

EventsController in WebApiSample is receiving event data as JObject, but TestWorkFlow is trying to cast data to string. This would probably cause headache when first opening the WebApiSample.

Copy link
Owner

@danielgerlag danielgerlag left a comment

Choose a reason for hiding this comment

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

Thanks for this... perhaps we should rather do the cast on publish event?

@hieuxlu
Copy link
Contributor Author

hieuxlu commented Mar 30, 2019

Cast JObject on publish event will not work with different workflow data type.

@danielgerlag
Copy link
Owner

As this is a sample, I'd prefer to keep it simple, it does not need to work for all sorts of types... just illustrate how it works.

@hieuxlu
Copy link
Contributor Author

hieuxlu commented Apr 17, 2019

Sorry for late reply. Yes, for simplicity, I've moved the cast to EventController. I've also added Swagger for easy debugging WebApiSample.

Please have a look. Thank you.

@hieuxlu hieuxlu changed the title fix(sample): Fix WebApiSample InvalidCastException when casting JObject to string chore(sample): Improve WebApiSample, adding SwaggerUI, fix invalid cast from JObject Apr 17, 2019
@danielgerlag danielgerlag merged commit bbf2ae1 into danielgerlag:master May 12, 2019
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.

2 participants