tigrOAS.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. openapi: 3.0.1
  2. info:
  3. title: TIGRO
  4. description: Explore occurrences, co-occurrences and textual contexts of forms and lems in a corpus which is defined externally.
  5. version: 1.0.0
  6. servers:
  7. - url: 'http://192.168.10.245'
  8. paths:
  9. /simple_get_query:
  10. post:
  11. summary: Submit a simple query.
  12. description: Cerca 1. occorrenze forme e/o lemmi con opzioni; 2. cooccorrenze di 2+ forme e/o lemmi restituendo direttamente anche i loro contesti.
  13. requestBody:
  14. required: true
  15. content:
  16. application/json:
  17. schema:
  18. type: object
  19. properties:
  20. queryList:
  21. type: array
  22. items:
  23. type: object
  24. properties:
  25. stringa:
  26. type: string
  27. espansa:
  28. type: integer
  29. enum:
  30. - 0
  31. - 1
  32. raddoppiata:
  33. type: integer
  34. enum:
  35. - 0
  36. - 1
  37. tipo:
  38. type: string
  39. enum:
  40. - "forma"
  41. - "lemma"
  42. - "lemmaForma"
  43. - "formLemma"
  44. responses:
  45. '200':
  46. description: OK
  47. content:
  48. application/json:
  49. schema:
  50. $ref: '#/components/schemas/SimpleGetQueryArray'
  51. '400':
  52. description: Bad request
  53. '500':
  54. description: Internal server error
  55. components:
  56. schemas:
  57. SimpleGetQueryArray:
  58. type: array
  59. items:
  60. oneOf:
  61. - $ref: '#/components/schemas/Resp1'
  62. - $ref: '#/components/schemas/Resp2'
  63. - $ref: '#/components/schemas/Resp3'
  64. # - $ref: '#/components/schemas/Resp4' da inserire quando avremo la risposta di 'get_context'
  65. # GetContextArray:
  66. # type: array
  67. # items:
  68. # $ref: '#/components/schemas/Resp4'
  69. Resp1:
  70. type: object
  71. properties:
  72. cod:
  73. type: integer
  74. forma:
  75. type: string
  76. occ:
  77. type: integer
  78. Resp2:
  79. type: object
  80. properties:
  81. lemma:
  82. type: string
  83. cat_gr:
  84. type: string
  85. disambiguatore:
  86. type: string
  87. cod:
  88. type: integer
  89. occ:
  90. type: integer
  91. Resp3:
  92. type: object
  93. properties:
  94. lemma:
  95. type: string
  96. cat_gr:
  97. type: string
  98. disambiguatore:
  99. type: string
  100. cod:
  101. type: integer
  102. occ:
  103. type: integer
  104. forma:
  105. type: string
  106. # Resp4 la risposta di 'get_context