mock / fake.json
VishalMysore's picture
Create fake.json
b145cc6 verified
raw
history blame
27.8 kB
{
"openapi": "3.0.1",
"info": {
"title": "FakeRESTApi.Web V1",
"version": "v1"
},
"paths": {
"/api/v1/Activities": {
"get": {
"tags": [
"Activities"
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Activity"
}
}
},
"application/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Activity"
}
}
},
"text/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Activity"
}
}
}
}
}
}
},
"post": {
"tags": [
"Activities"
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
}
}
}
}
}
},
"/api/v1/Activities/{id}": {
"get": {
"tags": [
"Activities"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
}
}
}
}
},
"put": {
"tags": [
"Activities"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Activity"
}
}
}
}
}
},
"delete": {
"tags": [
"Activities"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/api/v1/Authors": {
"get": {
"tags": [
"Authors"
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Author"
}
}
},
"application/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Author"
}
}
},
"text/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Author"
}
}
}
}
}
}
},
"post": {
"tags": [
"Authors"
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
}
}
}
}
}
},
"/api/v1/Authors/authors/books/{idBook}": {
"get": {
"tags": [
"Authors"
],
"parameters": [
{
"name": "idBook",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Author"
}
}
},
"application/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Author"
}
}
},
"text/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Author"
}
}
}
}
}
}
}
},
"/api/v1/Authors/{id}": {
"get": {
"tags": [
"Authors"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
}
}
}
}
},
"put": {
"tags": [
"Authors"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Author"
}
}
}
}
}
},
"delete": {
"tags": [
"Authors"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/api/v1/Books": {
"get": {
"tags": [
"Books"
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Book"
}
}
},
"application/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Book"
}
}
},
"text/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Book"
}
}
}
}
}
}
},
"post": {
"tags": [
"Books"
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
}
}
},
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/api/v1/Books/{id}": {
"get": {
"tags": [
"Books"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
}
}
}
}
},
"put": {
"tags": [
"Books"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/Book"
}
}
}
},
"responses": {
"200": {
"description": "Success"
}
}
},
"delete": {
"tags": [
"Books"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/api/v1/CoverPhotos": {
"get": {
"tags": [
"CoverPhotos"
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
},
"application/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
},
"text/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
}
}
}
}
},
"post": {
"tags": [
"CoverPhotos"
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
}
}
}
}
},
"/api/v1/CoverPhotos/books/covers/{idBook}": {
"get": {
"tags": [
"CoverPhotos"
],
"parameters": [
{
"name": "idBook",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
},
"application/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
},
"text/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
}
}
}
}
}
},
"/api/v1/CoverPhotos/{id}": {
"get": {
"tags": [
"CoverPhotos"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
}
}
}
},
"put": {
"tags": [
"CoverPhotos"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/CoverPhoto"
}
}
}
}
}
},
"delete": {
"tags": [
"CoverPhotos"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/api/v1/Users": {
"get": {
"tags": [
"Users"
],
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
},
"application/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
},
"text/json; v=1.0": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
}
}
}
}
}
},
"post": {
"tags": [
"Users"
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"responses": {
"200": {
"description": "Success"
}
}
}
},
"/api/v1/Users/{id}": {
"get": {
"tags": [
"Users"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success"
}
}
},
"put": {
"tags": [
"Users"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"requestBody": {
"content": {
"application/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"text/json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/User"
}
},
"application/*+json; v=1.0": {
"schema": {
"$ref": "#/components/schemas/User"
}
}
}
},
"responses": {
"200": {
"description": "Success"
}
}
},
"delete": {
"tags": [
"Users"
],
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Success"
}
}
}
}
},
"components": {
"schemas": {
"Activity": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"title": {
"type": "string",
"nullable": true
},
"dueDate": {
"type": "string",
"format": "date-time"
},
"completed": {
"type": "boolean"
}
},
"additionalProperties": false
},
"Author": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"idBook": {
"type": "integer",
"format": "int32"
},
"firstName": {
"type": "string",
"nullable": true
},
"lastName": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
},
"Book": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"title": {
"type": "string",
"nullable": true
},
"description": {
"type": "string",
"nullable": true
},
"pageCount": {
"type": "integer",
"format": "int32"
},
"excerpt": {
"type": "string",
"nullable": true
},
"publishDate": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false
},
"CoverPhoto": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"idBook": {
"type": "integer",
"format": "int32"
},
"url": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"additionalProperties": false
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"userName": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}