Comments (3)
I thought about this a lot, but I decided it would be simpler to use as a POST request. How would you suggest sending the JSON schema if it were a GET request? The only thing I can think of is to url-encode it and attach it as a query parameter. That seemed like it would just make things more difficult for anybody who wanted to quickly curl
some data like so:
curl -X POST -H "Content-Type: application/json" --data @schema.json http://schematic-ipsum.herokuapp.com
Or using HTTPie:
http POST http://schematic-ipsum.herokuapp.com < schema.json
I don't think these tools support simply reading from a file and converting the contents to a query string.
If you think about it, in a way it's sort of like you are asking the server to create a new resource based on your schema (and then also send it back). Except it's non-deterministic and you can't ever request that resource again 😁
from schematic-ipsum.
Gotcha. Since supporting both methods is trivial I'd probably just handle the encoded JSON query param, in case it makes someone's life easier (for some reason).
from schematic-ipsum.
I also just realized that the GET request currently loads the HTML page that describes the service, so I'd have to put the API at some other path if I wanted to support GET. I think I'll just wait and see if anybody needs the GET version, and if they request it, then I'll think about how to support it. Closing for now.
from schematic-ipsum.
Related Issues (20)
- Improve "Try it" box design
- Add support for generating links to placeholder images HOT 2
- Support for enum HOT 1
- Add recipes
- Support dereferencing of schemas HOT 4
- http://json-schema.org/draft-03/schema#/properties/required attribute not supported (fails validation) HOT 2
- I'm so sorry, I think I just broke your website HOT 1
- Array length hint HOT 8
- expose api as npm package?
- Getting Bad Request in many cases of "custom" attributes
- bower/Front end only version
- use property name as additional hint to generate content
- Add support for draft 4 of the standard... HOT 1
- "required" fields throw errors... HOT 2
- Took down your site :( HOT 3
- Could not generate for this schema
- internal $ref throws uncaught exception
- Ability to define accepted range for integer and number types
- Add support for draft-06
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schematic-ipsum.