Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2020
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 34.93 KB | None | 0 0
  1. {
  2.     "openapi": "3.0.2",
  3.     "info": {
  4.         "title": "",
  5.         "version": "0.0.0"
  6.     },
  7.     "paths": {
  8.         "/api/articles": {
  9.             "get": {
  10.                 "tags": [
  11.                     "Article"
  12.                 ],
  13.                 "operationId": "getArticleCollection",
  14.                 "summary": "Retrieves the collection of Article resources.",
  15.                 "responses": {
  16.                     "200": {
  17.                         "description": "Article collection response",
  18.                         "content": {
  19.                             "application/ld+json": {
  20.                                 "schema": {
  21.                                     "type": "object",
  22.                                     "properties": {
  23.                                         "hydra:member": {
  24.                                             "type": "array",
  25.                                             "items": {
  26.                                                 "$ref": "#/components/schemas/Article:jsonld"
  27.                                             }
  28.                                         },
  29.                                         "hydra:totalItems": {
  30.                                             "type": "integer",
  31.                                             "minimum": 0
  32.                                         },
  33.                                         "hydra:view": {
  34.                                             "type": "object",
  35.                                             "properties": {
  36.                                                 "@id": {
  37.                                                     "type": "string",
  38.                                                     "format": "iri-reference"
  39.                                                 },
  40.                                                 "@type": {
  41.                                                     "type": "string"
  42.                                                 },
  43.                                                 "hydra:first": {
  44.                                                     "type": "string",
  45.                                                     "format": "iri-reference"
  46.                                                 },
  47.                                                 "hydra:last": {
  48.                                                     "type": "string",
  49.                                                     "format": "iri-reference"
  50.                                                 },
  51.                                                 "hydra:next": {
  52.                                                     "type": "string",
  53.                                                     "format": "iri-reference"
  54.                                                 }
  55.                                             }
  56.                                         },
  57.                                         "hydra:search": {
  58.                                             "type": "object",
  59.                                             "properties": {
  60.                                                 "@type": {
  61.                                                     "type": "string"
  62.                                                 },
  63.                                                 "hydra:template": {
  64.                                                     "type": "string"
  65.                                                 },
  66.                                                 "hydra:variableRepresentation": {
  67.                                                     "type": "string"
  68.                                                 },
  69.                                                 "hydra:mapping": {
  70.                                                     "type": "array",
  71.                                                     "items": {
  72.                                                         "type": "object",
  73.                                                         "properties": {
  74.                                                             "@type": {
  75.                                                                 "type": "string"
  76.                                                             },
  77.                                                             "variable": {
  78.                                                                 "type": "string"
  79.                                                             },
  80.                                                             "property": {
  81.                                                                 "type": "string"
  82.                                                             },
  83.                                                             "required": {
  84.                                                                 "type": "boolean"
  85.                                                             }
  86.                                                         }
  87.                                                     }
  88.                                                 }
  89.                                             }
  90.                                         }
  91.                                     },
  92.                                     "required": [
  93.                                         "hydra:member"
  94.                                     ]
  95.                                 }
  96.                             },
  97.                             "application/json": {
  98.                                 "schema": {
  99.                                     "type": "array",
  100.                                     "items": {
  101.                                         "$ref": "#/components/schemas/Article"
  102.                                     }
  103.                                 }
  104.                             },
  105.                             "text/html": {
  106.                                 "schema": {
  107.                                     "type": "array",
  108.                                     "items": {
  109.                                         "$ref": "#/components/schemas/Article"
  110.                                     }
  111.                                 }
  112.                             }
  113.                         }
  114.                     }
  115.                 },
  116.                 "parameters": [
  117.                     {
  118.                         "name": "page",
  119.                         "in": "query",
  120.                         "required": false,
  121.                         "description": "The collection page number",
  122.                         "schema": {
  123.                             "type": "integer",
  124.                             "default": 1
  125.                         }
  126.                     }
  127.                 ]
  128.             },
  129.             "post": {
  130.                 "tags": [
  131.                     "Article"
  132.                 ],
  133.                 "operationId": "postArticleCollection",
  134.                 "summary": "Creates a Article resource.",
  135.                 "responses": {
  136.                     "201": {
  137.                         "description": "Article resource created",
  138.                         "content": {
  139.                             "application/ld+json": {
  140.                                 "schema": {
  141.                                     "$ref": "#/components/schemas/Article:jsonld"
  142.                                 }
  143.                             },
  144.                             "application/json": {
  145.                                 "schema": {
  146.                                     "$ref": "#/components/schemas/Article"
  147.                                 }
  148.                             },
  149.                             "text/html": {
  150.                                 "schema": {
  151.                                     "$ref": "#/components/schemas/Article"
  152.                                 }
  153.                             }
  154.                         },
  155.                         "links": {
  156.                             "GetArticleItem": {
  157.                                 "parameters": {
  158.                                     "id": "$response.body#/id"
  159.                                 },
  160.                                 "operationId": "getArticleItem",
  161.                                 "description": "The `id` value returned in the response can be used as the `id` parameter in `GET /api/articles/{id}`."
  162.                             }
  163.                         }
  164.                     },
  165.                     "400": {
  166.                         "description": "Invalid input"
  167.                     },
  168.                     "404": {
  169.                         "description": "Resource not found"
  170.                     }
  171.                 },
  172.                 "requestBody": {
  173.                     "content": {
  174.                         "application/ld+json": {
  175.                             "schema": {
  176.                                 "$ref": "#/components/schemas/Article:jsonld"
  177.                             }
  178.                         },
  179.                         "application/json": {
  180.                             "schema": {
  181.                                 "$ref": "#/components/schemas/Article"
  182.                             }
  183.                         },
  184.                         "text/html": {
  185.                             "schema": {
  186.                                 "$ref": "#/components/schemas/Article"
  187.                             }
  188.                         }
  189.                     },
  190.                     "description": "The new Article resource"
  191.                 }
  192.             }
  193.         },
  194.         "/api/articles/{id}": {
  195.             "get": {
  196.                 "tags": [
  197.                     "Article"
  198.                 ],
  199.                 "operationId": "getArticleItem",
  200.                 "summary": "Retrieves a Article resource.",
  201.                 "parameters": [
  202.                     {
  203.                         "name": "id",
  204.                         "in": "path",
  205.                         "required": true,
  206.                         "schema": {
  207.                             "type": "string"
  208.                         }
  209.                     }
  210.                 ],
  211.                 "responses": {
  212.                     "200": {
  213.                         "description": "Article resource response",
  214.                         "content": {
  215.                             "application/ld+json": {
  216.                                 "schema": {
  217.                                     "$ref": "#/components/schemas/Article:jsonld"
  218.                                 }
  219.                             },
  220.                             "application/json": {
  221.                                 "schema": {
  222.                                     "$ref": "#/components/schemas/Article"
  223.                                 }
  224.                             },
  225.                             "text/html": {
  226.                                 "schema": {
  227.                                     "$ref": "#/components/schemas/Article"
  228.                                 }
  229.                             }
  230.                         }
  231.                     },
  232.                     "404": {
  233.                         "description": "Resource not found"
  234.                     }
  235.                 }
  236.             },
  237.             "delete": {
  238.                 "tags": [
  239.                     "Article"
  240.                 ],
  241.                 "operationId": "deleteArticleItem",
  242.                 "summary": "Removes the Article resource.",
  243.                 "responses": {
  244.                     "204": {
  245.                         "description": "Article resource deleted"
  246.                     },
  247.                     "404": {
  248.                         "description": "Resource not found"
  249.                     }
  250.                 },
  251.                 "parameters": [
  252.                     {
  253.                         "name": "id",
  254.                         "in": "path",
  255.                         "required": true,
  256.                         "schema": {
  257.                             "type": "string"
  258.                         }
  259.                     }
  260.                 ]
  261.             },
  262.             "put": {
  263.                 "tags": [
  264.                     "Article"
  265.                 ],
  266.                 "operationId": "putArticleItem",
  267.                 "summary": "Replaces the Article resource.",
  268.                 "parameters": [
  269.                     {
  270.                         "name": "id",
  271.                         "in": "path",
  272.                         "required": true,
  273.                         "schema": {
  274.                             "type": "string"
  275.                         }
  276.                     }
  277.                 ],
  278.                 "responses": {
  279.                     "200": {
  280.                         "description": "Article resource updated",
  281.                         "content": {
  282.                             "application/ld+json": {
  283.                                 "schema": {
  284.                                     "$ref": "#/components/schemas/Article:jsonld"
  285.                                 }
  286.                             },
  287.                             "application/json": {
  288.                                 "schema": {
  289.                                     "$ref": "#/components/schemas/Article"
  290.                                 }
  291.                             },
  292.                             "text/html": {
  293.                                 "schema": {
  294.                                     "$ref": "#/components/schemas/Article"
  295.                                 }
  296.                             }
  297.                         }
  298.                     },
  299.                     "400": {
  300.                         "description": "Invalid input"
  301.                     },
  302.                     "404": {
  303.                         "description": "Resource not found"
  304.                     }
  305.                 },
  306.                 "requestBody": {
  307.                     "content": {
  308.                         "application/ld+json": {
  309.                             "schema": {
  310.                                 "$ref": "#/components/schemas/Article:jsonld"
  311.                             }
  312.                         },
  313.                         "application/json": {
  314.                             "schema": {
  315.                                 "$ref": "#/components/schemas/Article"
  316.                             }
  317.                         },
  318.                         "text/html": {
  319.                             "schema": {
  320.                                 "$ref": "#/components/schemas/Article"
  321.                             }
  322.                         }
  323.                     },
  324.                     "description": "The updated Article resource"
  325.                 }
  326.             },
  327.             "patch": {
  328.                 "tags": [
  329.                     "Article"
  330.                 ],
  331.                 "operationId": "patchArticleItem",
  332.                 "summary": "Updates the Article resource.",
  333.                 "parameters": [
  334.                     {
  335.                         "name": "id",
  336.                         "in": "path",
  337.                         "required": true,
  338.                         "schema": {
  339.                             "type": "string"
  340.                         }
  341.                     }
  342.                 ],
  343.                 "responses": {
  344.                     "200": {
  345.                         "description": "Article resource updated",
  346.                         "content": {
  347.                             "application/ld+json": {
  348.                                 "schema": {
  349.                                     "$ref": "#/components/schemas/Article:jsonld"
  350.                                 }
  351.                             },
  352.                             "application/json": {
  353.                                 "schema": {
  354.                                     "$ref": "#/components/schemas/Article"
  355.                                 }
  356.                             },
  357.                             "text/html": {
  358.                                 "schema": {
  359.                                     "$ref": "#/components/schemas/Article"
  360.                                 }
  361.                             }
  362.                         }
  363.                     },
  364.                     "400": {
  365.                         "description": "Invalid input"
  366.                     },
  367.                     "404": {
  368.                         "description": "Resource not found"
  369.                     }
  370.                 },
  371.                 "requestBody": {
  372.                     "content": {
  373.                         "application/merge-patch+json": {
  374.                             "schema": {
  375.                                 "$ref": "#/components/schemas/Article"
  376.                             }
  377.                         }
  378.                     },
  379.                     "description": "The updated Article resource"
  380.                 }
  381.             }
  382.         },
  383.         "/api/users": {
  384.             "get": {
  385.                 "tags": [
  386.                     "User"
  387.                 ],
  388.                 "operationId": "getUserCollection",
  389.                 "summary": "Retrieves the collection of User resources.",
  390.                 "responses": {
  391.                     "200": {
  392.                         "description": "User collection response",
  393.                         "content": {
  394.                             "application/ld+json": {
  395.                                 "schema": {
  396.                                     "type": "object",
  397.                                     "properties": {
  398.                                         "hydra:member": {
  399.                                             "type": "array",
  400.                                             "items": {
  401.                                                 "$ref": "#/components/schemas/User:jsonld"
  402.                                             }
  403.                                         },
  404.                                         "hydra:totalItems": {
  405.                                             "type": "integer",
  406.                                             "minimum": 0
  407.                                         },
  408.                                         "hydra:view": {
  409.                                             "type": "object",
  410.                                             "properties": {
  411.                                                 "@id": {
  412.                                                     "type": "string",
  413.                                                     "format": "iri-reference"
  414.                                                 },
  415.                                                 "@type": {
  416.                                                     "type": "string"
  417.                                                 },
  418.                                                 "hydra:first": {
  419.                                                     "type": "string",
  420.                                                     "format": "iri-reference"
  421.                                                 },
  422.                                                 "hydra:last": {
  423.                                                     "type": "string",
  424.                                                     "format": "iri-reference"
  425.                                                 },
  426.                                                 "hydra:next": {
  427.                                                     "type": "string",
  428.                                                     "format": "iri-reference"
  429.                                                 }
  430.                                             }
  431.                                         },
  432.                                         "hydra:search": {
  433.                                             "type": "object",
  434.                                             "properties": {
  435.                                                 "@type": {
  436.                                                     "type": "string"
  437.                                                 },
  438.                                                 "hydra:template": {
  439.                                                     "type": "string"
  440.                                                 },
  441.                                                 "hydra:variableRepresentation": {
  442.                                                     "type": "string"
  443.                                                 },
  444.                                                 "hydra:mapping": {
  445.                                                     "type": "array",
  446.                                                     "items": {
  447.                                                         "type": "object",
  448.                                                         "properties": {
  449.                                                             "@type": {
  450.                                                                 "type": "string"
  451.                                                             },
  452.                                                             "variable": {
  453.                                                                 "type": "string"
  454.                                                             },
  455.                                                             "property": {
  456.                                                                 "type": "string"
  457.                                                             },
  458.                                                             "required": {
  459.                                                                 "type": "boolean"
  460.                                                             }
  461.                                                         }
  462.                                                     }
  463.                                                 }
  464.                                             }
  465.                                         }
  466.                                     },
  467.                                     "required": [
  468.                                         "hydra:member"
  469.                                     ]
  470.                                 }
  471.                             },
  472.                             "application/json": {
  473.                                 "schema": {
  474.                                     "type": "array",
  475.                                     "items": {
  476.                                         "$ref": "#/components/schemas/User"
  477.                                     }
  478.                                 }
  479.                             },
  480.                             "text/html": {
  481.                                 "schema": {
  482.                                     "type": "array",
  483.                                     "items": {
  484.                                         "$ref": "#/components/schemas/User"
  485.                                     }
  486.                                 }
  487.                             }
  488.                         }
  489.                     }
  490.                 },
  491.                 "parameters": [
  492.                     {
  493.                         "name": "page",
  494.                         "in": "query",
  495.                         "required": false,
  496.                         "description": "The collection page number",
  497.                         "schema": {
  498.                             "type": "integer",
  499.                             "default": 1
  500.                         }
  501.                     }
  502.                 ]
  503.             },
  504.             "post": {
  505.                 "tags": [
  506.                     "User"
  507.                 ],
  508.                 "operationId": "postUserCollection",
  509.                 "summary": "Creates a User resource.",
  510.                 "responses": {
  511.                     "201": {
  512.                         "description": "User resource created",
  513.                         "content": {
  514.                             "application/ld+json": {
  515.                                 "schema": {
  516.                                     "$ref": "#/components/schemas/User:jsonld"
  517.                                 }
  518.                             },
  519.                             "application/json": {
  520.                                 "schema": {
  521.                                     "$ref": "#/components/schemas/User"
  522.                                 }
  523.                             },
  524.                             "text/html": {
  525.                                 "schema": {
  526.                                     "$ref": "#/components/schemas/User"
  527.                                 }
  528.                             }
  529.                         },
  530.                         "links": {
  531.                             "GetUserItem": {
  532.                                 "parameters": {
  533.                                     "id": "$response.body#/id"
  534.                                 },
  535.                                 "operationId": "getUserItem",
  536.                                 "description": "The `id` value returned in the response can be used as the `id` parameter in `GET /api/users/{id}`."
  537.                             }
  538.                         }
  539.                     },
  540.                     "400": {
  541.                         "description": "Invalid input"
  542.                     },
  543.                     "404": {
  544.                         "description": "Resource not found"
  545.                     }
  546.                 },
  547.                 "requestBody": {
  548.                     "content": {
  549.                         "application/ld+json": {
  550.                             "schema": {
  551.                                 "$ref": "#/components/schemas/User:jsonld"
  552.                             }
  553.                         },
  554.                         "application/json": {
  555.                             "schema": {
  556.                                 "$ref": "#/components/schemas/User"
  557.                             }
  558.                         },
  559.                         "text/html": {
  560.                             "schema": {
  561.                                 "$ref": "#/components/schemas/User"
  562.                             }
  563.                         }
  564.                     },
  565.                     "description": "The new User resource"
  566.                 }
  567.             }
  568.         },
  569.         "/api/users/{id}": {
  570.             "get": {
  571.                 "tags": [
  572.                     "User"
  573.                 ],
  574.                 "operationId": "getUserItem",
  575.                 "summary": "Retrieves a User resource.",
  576.                 "parameters": [
  577.                     {
  578.                         "name": "id",
  579.                         "in": "path",
  580.                         "required": true,
  581.                         "schema": {
  582.                             "type": "string"
  583.                         }
  584.                     }
  585.                 ],
  586.                 "responses": {
  587.                     "200": {
  588.                         "description": "User resource response",
  589.                         "content": {
  590.                             "application/ld+json": {
  591.                                 "schema": {
  592.                                     "$ref": "#/components/schemas/User:jsonld"
  593.                                 }
  594.                             },
  595.                             "application/json": {
  596.                                 "schema": {
  597.                                     "$ref": "#/components/schemas/User"
  598.                                 }
  599.                             },
  600.                             "text/html": {
  601.                                 "schema": {
  602.                                     "$ref": "#/components/schemas/User"
  603.                                 }
  604.                             }
  605.                         }
  606.                     },
  607.                     "404": {
  608.                         "description": "Resource not found"
  609.                     }
  610.                 }
  611.             },
  612.             "delete": {
  613.                 "tags": [
  614.                     "User"
  615.                 ],
  616.                 "operationId": "deleteUserItem",
  617.                 "summary": "Removes the User resource.",
  618.                 "responses": {
  619.                     "204": {
  620.                         "description": "User resource deleted"
  621.                     },
  622.                     "404": {
  623.                         "description": "Resource not found"
  624.                     }
  625.                 },
  626.                 "parameters": [
  627.                     {
  628.                         "name": "id",
  629.                         "in": "path",
  630.                         "required": true,
  631.                         "schema": {
  632.                             "type": "string"
  633.                         }
  634.                     }
  635.                 ]
  636.             },
  637.             "put": {
  638.                 "tags": [
  639.                     "User"
  640.                 ],
  641.                 "operationId": "putUserItem",
  642.                 "summary": "Replaces the User resource.",
  643.                 "parameters": [
  644.                     {
  645.                         "name": "id",
  646.                         "in": "path",
  647.                         "required": true,
  648.                         "schema": {
  649.                             "type": "string"
  650.                         }
  651.                     }
  652.                 ],
  653.                 "responses": {
  654.                     "200": {
  655.                         "description": "User resource updated",
  656.                         "content": {
  657.                             "application/ld+json": {
  658.                                 "schema": {
  659.                                     "$ref": "#/components/schemas/User:jsonld"
  660.                                 }
  661.                             },
  662.                             "application/json": {
  663.                                 "schema": {
  664.                                     "$ref": "#/components/schemas/User"
  665.                                 }
  666.                             },
  667.                             "text/html": {
  668.                                 "schema": {
  669.                                     "$ref": "#/components/schemas/User"
  670.                                 }
  671.                             }
  672.                         }
  673.                     },
  674.                     "400": {
  675.                         "description": "Invalid input"
  676.                     },
  677.                     "404": {
  678.                         "description": "Resource not found"
  679.                     }
  680.                 },
  681.                 "requestBody": {
  682.                     "content": {
  683.                         "application/ld+json": {
  684.                             "schema": {
  685.                                 "$ref": "#/components/schemas/User:jsonld"
  686.                             }
  687.                         },
  688.                         "application/json": {
  689.                             "schema": {
  690.                                 "$ref": "#/components/schemas/User"
  691.                             }
  692.                         },
  693.                         "text/html": {
  694.                             "schema": {
  695.                                 "$ref": "#/components/schemas/User"
  696.                             }
  697.                         }
  698.                     },
  699.                     "description": "The updated User resource"
  700.                 }
  701.             },
  702.             "patch": {
  703.                 "tags": [
  704.                     "User"
  705.                 ],
  706.                 "operationId": "patchUserItem",
  707.                 "summary": "Updates the User resource.",
  708.                 "parameters": [
  709.                     {
  710.                         "name": "id",
  711.                         "in": "path",
  712.                         "required": true,
  713.                         "schema": {
  714.                             "type": "string"
  715.                         }
  716.                     }
  717.                 ],
  718.                 "responses": {
  719.                     "200": {
  720.                         "description": "User resource updated",
  721.                         "content": {
  722.                             "application/ld+json": {
  723.                                 "schema": {
  724.                                     "$ref": "#/components/schemas/User:jsonld"
  725.                                 }
  726.                             },
  727.                             "application/json": {
  728.                                 "schema": {
  729.                                     "$ref": "#/components/schemas/User"
  730.                                 }
  731.                             },
  732.                             "text/html": {
  733.                                 "schema": {
  734.                                     "$ref": "#/components/schemas/User"
  735.                                 }
  736.                             }
  737.                         }
  738.                     },
  739.                     "400": {
  740.                         "description": "Invalid input"
  741.                     },
  742.                     "404": {
  743.                         "description": "Resource not found"
  744.                     }
  745.                 },
  746.                 "requestBody": {
  747.                     "content": {
  748.                         "application/merge-patch+json": {
  749.                             "schema": {
  750.                                 "$ref": "#/components/schemas/User"
  751.                             }
  752.                         }
  753.                     },
  754.                     "description": "The updated User resource"
  755.                 }
  756.             }
  757.         }
  758.     },
  759.     "components": {
  760.         "schemas": {
  761.             "Article": {
  762.                 "type": "object",
  763.                 "description": "",
  764.                 "properties": {
  765.                     "id": {
  766.                         "readOnly": true,
  767.                         "type": "integer"
  768.                     },
  769.                     "text": {
  770.                         "type": "string",
  771.                         "nullable": true
  772.                     }
  773.                 }
  774.             },
  775.             "Article:jsonld": {
  776.                 "type": "object",
  777.                 "description": "",
  778.                 "properties": {
  779.                     "@context": {
  780.                         "readOnly": true,
  781.                         "type": "string"
  782.                     },
  783.                     "@id": {
  784.                         "readOnly": true,
  785.                         "type": "string"
  786.                     },
  787.                     "@type": {
  788.                         "readOnly": true,
  789.                         "type": "string"
  790.                     },
  791.                     "id": {
  792.                         "readOnly": true,
  793.                         "type": "integer"
  794.                     },
  795.                     "text": {
  796.                         "type": "string",
  797.                         "nullable": true
  798.                     }
  799.                 }
  800.             },
  801.             "User": {
  802.                 "type": "object",
  803.                 "description": "",
  804.                 "properties": {
  805.                     "id": {
  806.                         "readOnly": true,
  807.                         "type": "integer"
  808.                     },
  809.                     "name": {
  810.                         "type": "string",
  811.                         "nullable": true
  812.                     }
  813.                 }
  814.             },
  815.             "User:jsonld": {
  816.                 "type": "object",
  817.                 "description": "",
  818.                 "properties": {
  819.                     "@context": {
  820.                         "readOnly": true,
  821.                         "type": "string"
  822.                     },
  823.                     "@id": {
  824.                         "readOnly": true,
  825.                         "type": "string"
  826.                     },
  827.                     "@type": {
  828.                         "readOnly": true,
  829.                         "type": "string"
  830.                     },
  831.                     "id": {
  832.                         "readOnly": true,
  833.                         "type": "integer"
  834.                     },
  835.                     "name": {
  836.                         "type": "string",
  837.                         "nullable": true
  838.                     }
  839.                 }
  840.             }
  841.         }
  842.     }
  843. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement