-
Notifications
You must be signed in to change notification settings - Fork 83
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
HTML getting rendered in the response field #21
Comments
Hey @boyney123, Good work with Mockit! I'm keen on contributing regularly and immensely to it and also use it in my workplace. I can take this up. Seems like a good way to delve into Mockit code and get my hands dirty! |
Hey @samrith-s, Yeah, that sounds great! 🙇 👍 Yeah give it a go and see what you can find. Mockit is using |
@boyney123 I had a look at it. The issue seems to be the package I think it'd be ideal to go for something better. Something a la Postman. Probably something like this: http://securingsincity.github.io/react-ace/ |
@samrith-s yeah sure give it ago see what you can do 👍 I think at some point we should validate the inputs in this form. I'm adding some new inputs as part of #4 , so validation will need to come at some point. Looking at Formik at the moment. But yeah see what you can do, and get that JSON edited and saved with |
Agreed. But I think we should ask the user to set a response type mandatorily, and strip the validation from the editor. Another function which validates, based on response content type, before saving it to state. Right now, it’s too coupled with the editor and dependent on the editor itself, which shouldn’t ideally be the case. |
Quick question, @boyney123 I have integrated Ace Editor, but I need to save the parser for that route as well. Which validates data. How do I save it to the I want to add something like |
@boyney123 Could you maybe help me out here? My React App isn't hot reloading. Keep getting the same error, after running |
Hey @samrith-s @boyney123 left out the but hot reloading is also possible by mounting the code from your workstation into the container looking at the Dockerfile, you should be able to just mount the whole directory into each WORKDIR, so something like this could work... but is untested
by mounting the whole directory instead of just the routes.json, the used routes json changes from src/config/routes.json to ./configuration/routes.json ps: feel free to ping me if you have any questions about docker/docker-compose @boyney123, i do have some experience on the topic :) |
Thanks for this @wohlben and helping out. I'm going to raise some docs about how people can contribute and get the whole environment setup as I realise it might be the easiest thing to get up and running (to work on) |
What you did:
Add this HTML snippet inside the response field. And you will see it render...
What happened:
It rendered the HTML
Suggested solution:
I think at the moment mockit will only return JSON responses. It would be nice that HTML does not get rendered as HTML, but also maybe give the user an error if HTML was added?
Option 2: We can try and support HTML as responses but not sure what would be involved.
The text was updated successfully, but these errors were encountered: