[IMP] developer/api/extract_api: rework page to get rid of switchers

task-2787415

closes odoo/documentation#1689

X-original-commit: 85b7200944
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
Antoine Vandevenne (anv) 2022-03-11 14:09:00 +00:00
parent 7a8640d21c
commit f220a30c6c

View File

@ -76,10 +76,7 @@ Request Body
The client email. The client email.
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"jsonrpc": string, "jsonrpc": string,
@ -127,10 +124,7 @@ Response
============= ============================================================== ============= ==============================================================
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"jsonrpc": string, "jsonrpc": string,
@ -142,7 +136,6 @@ Response
} }
} }
.. _webservices/extract_api/invoice_get_results: .. _webservices/extract_api/invoice_get_results:
``/iap/invoice_extract/get_results`` ``/iap/invoice_extract/get_results``
@ -168,10 +161,7 @@ Request Body
The list of ``document_id`` for which you want to get the current parsing status. The list of ``document_id`` for which you want to get the current parsing status.
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"jsonrpc": string, "jsonrpc": string,
@ -183,7 +173,6 @@ Request Body
"id": string (hex), "id": string (hex),
} }
Response Response
^^^^^^^^ ^^^^^^^^
@ -213,10 +202,7 @@ Response
============= ============================================================== ============= ==============================================================
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"jsonrpc": string, "jsonrpc": string,
@ -256,11 +242,8 @@ For each feature, we return a list of candidates and we spotlight the candidate
``words`` ``words``
List of all the candidates for this feature ordered by decreasing score. List of all the candidates for this feature ordered by decreasing score.
.. container:: doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"selected_value": candidate_12, "selected_value": candidate_12,
@ -281,11 +264,8 @@ For each candidate we give its representation and position in the document. Cand
``page`` ``page``
Page of the original document on which the candidate is located (starts at 0). Page of the original document on which the candidate is located (starts at 0).
.. container:: doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"content": string|float, "content": string|float,
@ -351,11 +331,8 @@ For each candidate we give its representation and position in the document. Cand
It follows a more specific structure. It is basically a list of dictionaries where each dictionary represents an invoice line. Each value follows It follows a more specific structure. It is basically a list of dictionaries where each dictionary represents an invoice line. Each value follows
a :ref:`webservices/extract_api/invoice_get_results/feature_result` structure. a :ref:`webservices/extract_api/invoice_get_results/feature_result` structure.
.. container:: doc-aside .. rst-class:: doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
[ [
{ {
@ -400,10 +377,7 @@ Request Body
Therefore you should validate all the features you want to validate at once. Therefore you should validate all the features you want to validate at once.
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"jsonrpc": string, "jsonrpc": string,
@ -427,10 +401,7 @@ A **validation** for a given feature is a dictionary containing the textual repr
This format apply for all the features except for ``global_taxes`` and ``invoice_lines`` which have more complex validation format. This format apply for all the features except for ``global_taxes`` and ``invoice_lines`` which have more complex validation format.
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ "content": string|float } { "content": string|float }
@ -449,10 +420,7 @@ validation for ``global_taxes``
Indicates if ``amount`` already contains the tax or not. Indicates if ``amount`` already contains the tax or not.
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{"content": [ {"content": [
{ {
@ -470,10 +438,7 @@ validation for ``invoice_lines``
**lines** is a list of dictionaries. Each dictionary represents an invoice line. The dictionary keys speak for themselves. **lines** is a list of dictionaries. Each dictionary represents an invoice line. The dictionary keys speak for themselves.
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{"lines": [ {"lines": [
{ {
@ -517,10 +482,7 @@ Response
============= ========================================================== ============= ==========================================================
.. rst-class:: setup doc-aside .. rst-class:: setup doc-aside
.. code-block:: text
.. switcher::
.. code-block:: text
{ {
"jsonrpc": string, "jsonrpc": string,