├── LICENSE ├── mockend.yml └── readme.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Mockend 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /mockend.yml: -------------------------------------------------------------------------------- 1 | models: 2 | Post: 3 | hasMany: [Comment] 4 | fake: 5 | _count: 10 6 | cover: { imageURL: [1920, 1080] } 7 | title: { loremWords: [5, 20] } 8 | body: { loremParagraphs: [10, 100] } 9 | category: { oneOfString: [one, two, three] } 10 | isDraft: { bool: 20 } 11 | views: { int: [0, 1000] } 12 | createdAt: { dateTime: [2010-01-01T00:00:00Z, 2020-12-31T23:59:59Z] } 13 | Comment: 14 | belongsTo: [Post] 15 | fake: 16 | _count: 25 17 | email: email 18 | body: { loremParagraphs: [10, 100] } 19 | createdAt: { dateTime: [2010-01-01T00:00:00Z, 2020-12-31T23:59:59Z] } 20 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | > Demo repository for [Mockend](https://mockend.com/) 2 | 3 | # Config 4 | 5 | [`mockend.yml`](mockend.yml) describes an API which has `posts` and `comments`. Below you can find a non-exhaustive list of API calls you can make. 6 | 7 | To make modifications, fork or copy this config file and [install](https://github.com/marketplace/mockend) Mockend on your repo. 8 | 9 | The documentation is available at https://docs.mockend.com 10 | 11 | # REST examples 12 | 13 | - https://mockend.com/api/mockend/demo/posts – Post 14 | - https://mockend.com/api/mockend/demo/posts/1 – Post 1 15 | - https://mockend.com/api/mockend/demo/posts?createdAt_order=desc – Posts sorted by createdAt 16 | - https://mockend.com/api/mockend/demo/posts?category_eq=one – Posts in category one 17 | - https://mockend.com/api/mockend/demo/comments?postId_eq=1 – Comments for Post 1 18 | 19 | # GraphQL examples 20 | 21 | - [https://mockend.com/api/mockend/demo/graphql?query=...]() – Post and Comments 22 | 23 | # Try mockend 24 | 25 | [Install](https://github.com/marketplace/mockend) 🚀 26 | --------------------------------------------------------------------------------