Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

694 wiersze
20 KiB

  1. openapi: 3.1.0
  2. info:
  3. title: 'Matsen API Platform'
  4. description: ''
  5. version: 1.0.0
  6. servers:
  7. -
  8. url: /
  9. description: ''
  10. paths:
  11. /api/posts:
  12. get:
  13. operationId: api_posts_get_collection
  14. tags:
  15. - Post
  16. responses:
  17. 200:
  18. description: 'Post collection'
  19. content:
  20. application/ld+json:
  21. schema:
  22. type: object
  23. properties:
  24. 'hydra:member': { type: array, items: { $ref: '#/components/schemas/Post.jsonld' } }
  25. 'hydra:totalItems': { type: integer, minimum: 0 }
  26. '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:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } }
  27. '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, 'null'] }, required: { type: boolean } } } } } }
  28. required:
  29. - 'hydra:member'
  30. application/json:
  31. schema:
  32. type: array
  33. items:
  34. $ref: '#/components/schemas/Post'
  35. text/html:
  36. schema:
  37. type: array
  38. items:
  39. $ref: '#/components/schemas/Post'
  40. application/hal+json:
  41. schema:
  42. type: object
  43. properties:
  44. _embedded: { type: array, items: { $ref: '#/components/schemas/Post.jsonhal' } }
  45. totalItems: { type: integer, minimum: 0 }
  46. itemsPerPage: { type: integer, minimum: 0 }
  47. _links: { type: object, properties: { self: { type: object, properties: { href: { type: string, format: iri-reference } } }, first: { type: object, properties: { href: { type: string, format: iri-reference } } }, last: { type: object, properties: { href: { type: string, format: iri-reference } } }, next: { type: object, properties: { href: { type: string, format: iri-reference } } }, previous: { type: object, properties: { href: { type: string, format: iri-reference } } } } }
  48. required:
  49. - _links
  50. - _embedded
  51. summary: 'Retrieves the collection of Post resources.'
  52. description: 'Retrieves the collection of Post resources.'
  53. parameters:
  54. -
  55. name: page
  56. in: query
  57. description: 'The collection page number'
  58. required: false
  59. deprecated: false
  60. allowEmptyValue: true
  61. schema:
  62. type: integer
  63. default: 1
  64. style: form
  65. explode: false
  66. allowReserved: false
  67. deprecated: false
  68. post:
  69. operationId: api_posts_post
  70. tags:
  71. - Post
  72. responses:
  73. 201:
  74. description: 'Post resource created'
  75. content:
  76. application/ld+json:
  77. schema:
  78. $ref: '#/components/schemas/Post.jsonld'
  79. application/json:
  80. schema:
  81. $ref: '#/components/schemas/Post'
  82. text/html:
  83. schema:
  84. $ref: '#/components/schemas/Post'
  85. application/hal+json:
  86. schema:
  87. $ref: '#/components/schemas/Post.jsonhal'
  88. links: { }
  89. 400:
  90. description: 'Invalid input'
  91. 422:
  92. description: 'Unprocessable entity'
  93. summary: 'Creates a Post resource.'
  94. description: 'Creates a Post resource.'
  95. parameters: []
  96. requestBody:
  97. description: 'The new Post resource'
  98. content:
  99. application/ld+json:
  100. schema:
  101. $ref: '#/components/schemas/Post.jsonld'
  102. application/json:
  103. schema:
  104. $ref: '#/components/schemas/Post'
  105. text/html:
  106. schema:
  107. $ref: '#/components/schemas/Post'
  108. application/hal+json:
  109. schema:
  110. $ref: '#/components/schemas/Post.jsonhal'
  111. required: true
  112. deprecated: false
  113. parameters: []
  114. '/api/posts/{id}':
  115. get:
  116. operationId: api_posts_id_get
  117. tags:
  118. - Post
  119. responses:
  120. 200:
  121. description: 'Post resource'
  122. content:
  123. application/ld+json:
  124. schema:
  125. $ref: '#/components/schemas/Post.jsonld'
  126. application/json:
  127. schema:
  128. $ref: '#/components/schemas/Post'
  129. text/html:
  130. schema:
  131. $ref: '#/components/schemas/Post'
  132. application/hal+json:
  133. schema:
  134. $ref: '#/components/schemas/Post.jsonhal'
  135. 404:
  136. description: 'Resource not found'
  137. summary: 'Retrieves a Post resource.'
  138. description: 'Retrieves a Post resource.'
  139. parameters:
  140. -
  141. name: id
  142. in: path
  143. description: 'PostingApi identifier'
  144. required: true
  145. deprecated: false
  146. allowEmptyValue: false
  147. schema:
  148. type: string
  149. style: simple
  150. explode: false
  151. allowReserved: false
  152. deprecated: false
  153. delete:
  154. operationId: api_posts_id_delete
  155. tags:
  156. - Post
  157. responses:
  158. 204:
  159. description: 'Post resource deleted'
  160. 404:
  161. description: 'Resource not found'
  162. summary: 'Removes the Post resource.'
  163. description: 'Removes the Post resource.'
  164. parameters:
  165. -
  166. name: id
  167. in: path
  168. description: 'PostingApi identifier'
  169. required: true
  170. deprecated: false
  171. allowEmptyValue: false
  172. schema:
  173. type: string
  174. style: simple
  175. explode: false
  176. allowReserved: false
  177. deprecated: false
  178. patch:
  179. operationId: api_posts_id_patch
  180. tags:
  181. - Post
  182. responses:
  183. 200:
  184. description: 'Post resource updated'
  185. content:
  186. application/ld+json:
  187. schema:
  188. $ref: '#/components/schemas/Post.jsonld'
  189. application/json:
  190. schema:
  191. $ref: '#/components/schemas/Post'
  192. text/html:
  193. schema:
  194. $ref: '#/components/schemas/Post'
  195. application/hal+json:
  196. schema:
  197. $ref: '#/components/schemas/Post.jsonhal'
  198. links: { }
  199. 400:
  200. description: 'Invalid input'
  201. 422:
  202. description: 'Unprocessable entity'
  203. 404:
  204. description: 'Resource not found'
  205. summary: 'Updates the Post resource.'
  206. description: 'Updates the Post resource.'
  207. parameters:
  208. -
  209. name: id
  210. in: path
  211. description: 'PostingApi identifier'
  212. required: true
  213. deprecated: false
  214. allowEmptyValue: false
  215. schema:
  216. type: string
  217. style: simple
  218. explode: false
  219. allowReserved: false
  220. requestBody:
  221. description: 'The updated Post resource'
  222. content:
  223. application/merge-patch+json:
  224. schema:
  225. $ref: '#/components/schemas/Post'
  226. required: true
  227. deprecated: false
  228. parameters: []
  229. /api/users:
  230. get:
  231. operationId: api_users_get_collection
  232. tags:
  233. - User
  234. responses:
  235. 200:
  236. description: 'User collection'
  237. content:
  238. application/ld+json:
  239. schema:
  240. type: object
  241. properties:
  242. 'hydra:member': { type: array, items: { $ref: '#/components/schemas/User.jsonld' } }
  243. 'hydra:totalItems': { type: integer, minimum: 0 }
  244. '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:previous': { type: string, format: iri-reference }, 'hydra:next': { type: string, format: iri-reference } }, example: { '@id': string, type: string, 'hydra:first': string, 'hydra:last': string, 'hydra:previous': string, 'hydra:next': string } }
  245. '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, 'null'] }, required: { type: boolean } } } } } }
  246. required:
  247. - 'hydra:member'
  248. application/json:
  249. schema:
  250. type: array
  251. items:
  252. $ref: '#/components/schemas/User'
  253. text/html:
  254. schema:
  255. type: array
  256. items:
  257. $ref: '#/components/schemas/User'
  258. application/hal+json:
  259. schema:
  260. type: object
  261. properties:
  262. _embedded: { type: array, items: { $ref: '#/components/schemas/User.jsonhal' } }
  263. totalItems: { type: integer, minimum: 0 }
  264. itemsPerPage: { type: integer, minimum: 0 }
  265. _links: { type: object, properties: { self: { type: object, properties: { href: { type: string, format: iri-reference } } }, first: { type: object, properties: { href: { type: string, format: iri-reference } } }, last: { type: object, properties: { href: { type: string, format: iri-reference } } }, next: { type: object, properties: { href: { type: string, format: iri-reference } } }, previous: { type: object, properties: { href: { type: string, format: iri-reference } } } } }
  266. required:
  267. - _links
  268. - _embedded
  269. summary: 'Retrieves the collection of User resources.'
  270. description: 'Retrieves the collection of User resources.'
  271. parameters:
  272. -
  273. name: page
  274. in: query
  275. description: 'The collection page number'
  276. required: false
  277. deprecated: false
  278. allowEmptyValue: true
  279. schema:
  280. type: integer
  281. default: 1
  282. style: form
  283. explode: false
  284. allowReserved: false
  285. deprecated: false
  286. post:
  287. operationId: api_users_post
  288. tags:
  289. - User
  290. responses:
  291. 201:
  292. description: 'User resource created'
  293. content:
  294. application/ld+json:
  295. schema:
  296. $ref: '#/components/schemas/User.jsonld'
  297. application/json:
  298. schema:
  299. $ref: '#/components/schemas/User'
  300. text/html:
  301. schema:
  302. $ref: '#/components/schemas/User'
  303. application/hal+json:
  304. schema:
  305. $ref: '#/components/schemas/User.jsonhal'
  306. links: { }
  307. 400:
  308. description: 'Invalid input'
  309. 422:
  310. description: 'Unprocessable entity'
  311. summary: 'Creates a User resource.'
  312. description: 'Creates a User resource.'
  313. parameters: []
  314. requestBody:
  315. description: 'The new User resource'
  316. content:
  317. application/ld+json:
  318. schema:
  319. $ref: '#/components/schemas/User.jsonld'
  320. application/json:
  321. schema:
  322. $ref: '#/components/schemas/User'
  323. text/html:
  324. schema:
  325. $ref: '#/components/schemas/User'
  326. application/hal+json:
  327. schema:
  328. $ref: '#/components/schemas/User.jsonhal'
  329. required: true
  330. deprecated: false
  331. parameters: []
  332. '/api/users/{id}':
  333. get:
  334. operationId: api_users_id_get
  335. tags:
  336. - User
  337. responses:
  338. 200:
  339. description: 'User resource'
  340. content:
  341. application/ld+json:
  342. schema:
  343. $ref: '#/components/schemas/User.jsonld'
  344. application/json:
  345. schema:
  346. $ref: '#/components/schemas/User'
  347. text/html:
  348. schema:
  349. $ref: '#/components/schemas/User'
  350. application/hal+json:
  351. schema:
  352. $ref: '#/components/schemas/User.jsonhal'
  353. 404:
  354. description: 'Resource not found'
  355. summary: 'Retrieves a User resource.'
  356. description: 'Retrieves a User resource.'
  357. parameters:
  358. -
  359. name: id
  360. in: path
  361. description: 'UserApi identifier'
  362. required: true
  363. deprecated: false
  364. allowEmptyValue: false
  365. schema:
  366. type: string
  367. style: simple
  368. explode: false
  369. allowReserved: false
  370. deprecated: false
  371. patch:
  372. operationId: api_users_id_patch
  373. tags:
  374. - User
  375. responses:
  376. 200:
  377. description: 'User resource updated'
  378. content:
  379. application/ld+json:
  380. schema:
  381. $ref: '#/components/schemas/User.jsonld'
  382. application/json:
  383. schema:
  384. $ref: '#/components/schemas/User'
  385. text/html:
  386. schema:
  387. $ref: '#/components/schemas/User'
  388. application/hal+json:
  389. schema:
  390. $ref: '#/components/schemas/User.jsonhal'
  391. links: { }
  392. 400:
  393. description: 'Invalid input'
  394. 422:
  395. description: 'Unprocessable entity'
  396. 404:
  397. description: 'Resource not found'
  398. summary: 'Updates the User resource.'
  399. description: 'Updates the User resource.'
  400. parameters:
  401. -
  402. name: id
  403. in: path
  404. description: 'UserApi identifier'
  405. required: true
  406. deprecated: false
  407. allowEmptyValue: false
  408. schema:
  409. type: string
  410. style: simple
  411. explode: false
  412. allowReserved: false
  413. requestBody:
  414. description: 'The updated User resource'
  415. content:
  416. application/merge-patch+json:
  417. schema:
  418. $ref: '#/components/schemas/User'
  419. required: true
  420. deprecated: false
  421. parameters: []
  422. components:
  423. schemas:
  424. Post:
  425. type: object
  426. description: ''
  427. deprecated: false
  428. required:
  429. - message
  430. properties:
  431. message:
  432. type:
  433. - string
  434. - 'null'
  435. owner:
  436. 'owl:maxCardinality': 1
  437. type:
  438. - string
  439. - 'null'
  440. format: iri-reference
  441. createdAt:
  442. readOnly: true
  443. type:
  444. - string
  445. - 'null'
  446. format: date-time
  447. Post.jsonhal:
  448. type: object
  449. description: ''
  450. deprecated: false
  451. required:
  452. - message
  453. properties:
  454. _links:
  455. type: object
  456. properties:
  457. self:
  458. type: object
  459. properties:
  460. href:
  461. type: string
  462. format: iri-reference
  463. message:
  464. type:
  465. - string
  466. - 'null'
  467. owner:
  468. 'owl:maxCardinality': 1
  469. type:
  470. - string
  471. - 'null'
  472. format: iri-reference
  473. createdAt:
  474. readOnly: true
  475. type:
  476. - string
  477. - 'null'
  478. format: date-time
  479. Post.jsonld:
  480. type: object
  481. description: ''
  482. deprecated: false
  483. required:
  484. - message
  485. properties:
  486. '@context':
  487. readOnly: true
  488. oneOf:
  489. -
  490. type: string
  491. -
  492. type: object
  493. properties:
  494. '@vocab':
  495. type: string
  496. hydra:
  497. type: string
  498. enum: ['http://www.w3.org/ns/hydra/core#']
  499. required:
  500. - '@vocab'
  501. - hydra
  502. additionalProperties: true
  503. '@id':
  504. readOnly: true
  505. type: string
  506. '@type':
  507. readOnly: true
  508. type: string
  509. message:
  510. type:
  511. - string
  512. - 'null'
  513. owner:
  514. 'owl:maxCardinality': 1
  515. type:
  516. - string
  517. - 'null'
  518. format: iri-reference
  519. createdAt:
  520. readOnly: true
  521. type:
  522. - string
  523. - 'null'
  524. format: date-time
  525. User:
  526. type: object
  527. description: ''
  528. deprecated: false
  529. required:
  530. - email
  531. - firstName
  532. - lastName
  533. properties:
  534. email:
  535. format: email
  536. externalDocs:
  537. url: 'https://schema.org/email'
  538. type:
  539. - string
  540. - 'null'
  541. firstName:
  542. type:
  543. - string
  544. - 'null'
  545. lastName:
  546. type:
  547. - string
  548. - 'null'
  549. password:
  550. writeOnly: true
  551. description: 'The plaintext password when being set or changed.'
  552. type:
  553. - string
  554. - 'null'
  555. active:
  556. type: boolean
  557. createdAt:
  558. readOnly: true
  559. type:
  560. - string
  561. - 'null'
  562. format: date-time
  563. userPosts:
  564. type: array
  565. items:
  566. type: string
  567. format: iri-reference
  568. User.jsonhal:
  569. type: object
  570. description: ''
  571. deprecated: false
  572. required:
  573. - email
  574. - firstName
  575. - lastName
  576. properties:
  577. _links:
  578. type: object
  579. properties:
  580. self:
  581. type: object
  582. properties:
  583. href:
  584. type: string
  585. format: iri-reference
  586. email:
  587. format: email
  588. externalDocs:
  589. url: 'https://schema.org/email'
  590. type:
  591. - string
  592. - 'null'
  593. firstName:
  594. type:
  595. - string
  596. - 'null'
  597. lastName:
  598. type:
  599. - string
  600. - 'null'
  601. password:
  602. writeOnly: true
  603. description: 'The plaintext password when being set or changed.'
  604. type:
  605. - string
  606. - 'null'
  607. active:
  608. type: boolean
  609. createdAt:
  610. readOnly: true
  611. type:
  612. - string
  613. - 'null'
  614. format: date-time
  615. userPosts:
  616. type: array
  617. items:
  618. type: string
  619. format: iri-reference
  620. User.jsonld:
  621. type: object
  622. description: ''
  623. deprecated: false
  624. required:
  625. - email
  626. - firstName
  627. - lastName
  628. properties:
  629. '@context':
  630. readOnly: true
  631. oneOf:
  632. -
  633. type: string
  634. -
  635. type: object
  636. properties:
  637. '@vocab':
  638. type: string
  639. hydra:
  640. type: string
  641. enum: ['http://www.w3.org/ns/hydra/core#']
  642. required:
  643. - '@vocab'
  644. - hydra
  645. additionalProperties: true
  646. '@id':
  647. readOnly: true
  648. type: string
  649. '@type':
  650. readOnly: true
  651. type: string
  652. email:
  653. format: email
  654. externalDocs:
  655. url: 'https://schema.org/email'
  656. type:
  657. - string
  658. - 'null'
  659. firstName:
  660. type:
  661. - string
  662. - 'null'
  663. lastName:
  664. type:
  665. - string
  666. - 'null'
  667. password:
  668. writeOnly: true
  669. description: 'The plaintext password when being set or changed.'
  670. type:
  671. - string
  672. - 'null'
  673. active:
  674. type: boolean
  675. createdAt:
  676. readOnly: true
  677. type:
  678. - string
  679. - 'null'
  680. format: date-time
  681. userPosts:
  682. type: array
  683. items:
  684. type: string
  685. format: iri-reference
  686. responses: { }
  687. parameters: { }
  688. examples: { }
  689. requestBodies: { }
  690. headers: { }
  691. securitySchemes: { }
  692. security: []
  693. tags: []