Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "openapi": "3.0.2",
- "info": {
- "title": "",
- "version": "0.0.0"
- },
- "paths": {
- "/api/articles": {
- "get": {
- "tags": [
- "Article"
- ],
- "operationId": "getArticleCollection",
- "summary": "Retrieves the collection of Article resources.",
- "responses": {
- "200": {
- "description": "Article collection response",
- "content": {
- "application/ld+json": {
- "schema": {
- "type": "object",
- "properties": {
- "hydra:member": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Article:jsonld"
- }
- },
- "hydra:totalItems": {
- "type": "integer",
- "minimum": 0
- },
- "hydra:view": {
- "type": "object",
- "properties": {
- "@id": {
- "type": "string",
- "format": "iri-reference"
- },
- "@type": {
- "type": "string"
- },
- "hydra:first": {
- "type": "string",
- "format": "iri-reference"
- },
- "hydra:last": {
- "type": "string",
- "format": "iri-reference"
- },
- "hydra:next": {
- "type": "string",
- "format": "iri-reference"
- }
- }
- },
- "hydra:search": {
- "type": "object",
- "properties": {
- "@type": {
- "type": "string"
- },
- "hydra:template": {
- "type": "string"
- },
- "hydra:variableRepresentation": {
- "type": "string"
- },
- "hydra:mapping": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "@type": {
- "type": "string"
- },
- "variable": {
- "type": "string"
- },
- "property": {
- "type": "string"
- },
- "required": {
- "type": "boolean"
- }
- }
- }
- }
- }
- }
- },
- "required": [
- "hydra:member"
- ]
- }
- },
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Article"
- }
- }
- },
- "text/html": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Article"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "required": false,
- "description": "The collection page number",
- "schema": {
- "type": "integer",
- "default": 1
- }
- }
- ]
- },
- "post": {
- "tags": [
- "Article"
- ],
- "operationId": "postArticleCollection",
- "summary": "Creates a Article resource.",
- "responses": {
- "201": {
- "description": "Article resource created",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/Article:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- }
- },
- "links": {
- "GetArticleItem": {
- "parameters": {
- "id": "$response.body#/id"
- },
- "operationId": "getArticleItem",
- "description": "The `id` value returned in the response can be used as the `id` parameter in `GET /api/articles/{id}`."
- }
- }
- },
- "400": {
- "description": "Invalid input"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "requestBody": {
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/Article:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- }
- },
- "description": "The new Article resource"
- }
- }
- },
- "/api/articles/{id}": {
- "get": {
- "tags": [
- "Article"
- ],
- "operationId": "getArticleItem",
- "summary": "Retrieves a Article resource.",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Article resource response",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/Article:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- }
- }
- },
- "404": {
- "description": "Resource not found"
- }
- }
- },
- "delete": {
- "tags": [
- "Article"
- ],
- "operationId": "deleteArticleItem",
- "summary": "Removes the Article resource.",
- "responses": {
- "204": {
- "description": "Article resource deleted"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ]
- },
- "put": {
- "tags": [
- "Article"
- ],
- "operationId": "putArticleItem",
- "summary": "Replaces the Article resource.",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Article resource updated",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/Article:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- }
- }
- },
- "400": {
- "description": "Invalid input"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "requestBody": {
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/Article:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- }
- },
- "description": "The updated Article resource"
- }
- },
- "patch": {
- "tags": [
- "Article"
- ],
- "operationId": "patchArticleItem",
- "summary": "Updates the Article resource.",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Article resource updated",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/Article:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- }
- }
- },
- "400": {
- "description": "Invalid input"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "requestBody": {
- "content": {
- "application/merge-patch+json": {
- "schema": {
- "$ref": "#/components/schemas/Article"
- }
- }
- },
- "description": "The updated Article resource"
- }
- }
- },
- "/api/users": {
- "get": {
- "tags": [
- "User"
- ],
- "operationId": "getUserCollection",
- "summary": "Retrieves the collection of User resources.",
- "responses": {
- "200": {
- "description": "User collection response",
- "content": {
- "application/ld+json": {
- "schema": {
- "type": "object",
- "properties": {
- "hydra:member": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/User:jsonld"
- }
- },
- "hydra:totalItems": {
- "type": "integer",
- "minimum": 0
- },
- "hydra:view": {
- "type": "object",
- "properties": {
- "@id": {
- "type": "string",
- "format": "iri-reference"
- },
- "@type": {
- "type": "string"
- },
- "hydra:first": {
- "type": "string",
- "format": "iri-reference"
- },
- "hydra:last": {
- "type": "string",
- "format": "iri-reference"
- },
- "hydra:next": {
- "type": "string",
- "format": "iri-reference"
- }
- }
- },
- "hydra:search": {
- "type": "object",
- "properties": {
- "@type": {
- "type": "string"
- },
- "hydra:template": {
- "type": "string"
- },
- "hydra:variableRepresentation": {
- "type": "string"
- },
- "hydra:mapping": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "@type": {
- "type": "string"
- },
- "variable": {
- "type": "string"
- },
- "property": {
- "type": "string"
- },
- "required": {
- "type": "boolean"
- }
- }
- }
- }
- }
- }
- },
- "required": [
- "hydra:member"
- ]
- }
- },
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/User"
- }
- }
- },
- "text/html": {
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/User"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "name": "page",
- "in": "query",
- "required": false,
- "description": "The collection page number",
- "schema": {
- "type": "integer",
- "default": 1
- }
- }
- ]
- },
- "post": {
- "tags": [
- "User"
- ],
- "operationId": "postUserCollection",
- "summary": "Creates a User resource.",
- "responses": {
- "201": {
- "description": "User resource created",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/User:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- },
- "links": {
- "GetUserItem": {
- "parameters": {
- "id": "$response.body#/id"
- },
- "operationId": "getUserItem",
- "description": "The `id` value returned in the response can be used as the `id` parameter in `GET /api/users/{id}`."
- }
- }
- },
- "400": {
- "description": "Invalid input"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "requestBody": {
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/User:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- },
- "description": "The new User resource"
- }
- }
- },
- "/api/users/{id}": {
- "get": {
- "tags": [
- "User"
- ],
- "operationId": "getUserItem",
- "summary": "Retrieves a User resource.",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "User resource response",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/User:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- }
- },
- "404": {
- "description": "Resource not found"
- }
- }
- },
- "delete": {
- "tags": [
- "User"
- ],
- "operationId": "deleteUserItem",
- "summary": "Removes the User resource.",
- "responses": {
- "204": {
- "description": "User resource deleted"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ]
- },
- "put": {
- "tags": [
- "User"
- ],
- "operationId": "putUserItem",
- "summary": "Replaces the User resource.",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "User resource updated",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/User:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- }
- },
- "400": {
- "description": "Invalid input"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "requestBody": {
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/User:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- },
- "description": "The updated User resource"
- }
- },
- "patch": {
- "tags": [
- "User"
- ],
- "operationId": "patchUserItem",
- "summary": "Updates the User resource.",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "User resource updated",
- "content": {
- "application/ld+json": {
- "schema": {
- "$ref": "#/components/schemas/User:jsonld"
- }
- },
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- },
- "text/html": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- }
- },
- "400": {
- "description": "Invalid input"
- },
- "404": {
- "description": "Resource not found"
- }
- },
- "requestBody": {
- "content": {
- "application/merge-patch+json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- },
- "description": "The updated User resource"
- }
- }
- }
- },
- "components": {
- "schemas": {
- "Article": {
- "type": "object",
- "description": "",
- "properties": {
- "id": {
- "readOnly": true,
- "type": "integer"
- },
- "text": {
- "type": "string",
- "nullable": true
- }
- }
- },
- "Article:jsonld": {
- "type": "object",
- "description": "",
- "properties": {
- "@context": {
- "readOnly": true,
- "type": "string"
- },
- "@id": {
- "readOnly": true,
- "type": "string"
- },
- "@type": {
- "readOnly": true,
- "type": "string"
- },
- "id": {
- "readOnly": true,
- "type": "integer"
- },
- "text": {
- "type": "string",
- "nullable": true
- }
- }
- },
- "User": {
- "type": "object",
- "description": "",
- "properties": {
- "id": {
- "readOnly": true,
- "type": "integer"
- },
- "name": {
- "type": "string",
- "nullable": true
- }
- }
- },
- "User:jsonld": {
- "type": "object",
- "description": "",
- "properties": {
- "@context": {
- "readOnly": true,
- "type": "string"
- },
- "@id": {
- "readOnly": true,
- "type": "string"
- },
- "@type": {
- "readOnly": true,
- "type": "string"
- },
- "id": {
- "readOnly": true,
- "type": "integer"
- },
- "name": {
- "type": "string",
- "nullable": true
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement