Files
progcode/web/public/assets/editorial/2019/rest-api-response-matrix-2019.svg
T
huncode 18adfa80b4
Build and deploy / deploy (push) Successful in 13s
revise June and August 2019 articles
2026-07-31 10:49:16 +03:00

47 lines
4.5 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 1180" role="img" aria-labelledby="title desc">
<title id="title">Как OpenAPI связывает операцию с ответом и схемой</title>
<desc id="desc">Вертикальная схема показывает Operation Object, карту ответов 200 и 400, а затем различие между required полем nextCursor и nullable значением.</desc>
<rect width="720" height="1180" fill="#172554"/>
<rect x="42" y="34" width="636" height="112" rx="18" fill="#312e81"/>
<text x="360" y="80" text-anchor="middle" fill="#ffffff" font-size="28" font-family="Arial, sans-serif" font-weight="700">Операция становится матрицей</text>
<text x="360" y="116" text-anchor="middle" fill="#ddd6fe" font-size="21" font-family="Arial, sans-serif">вход → HTTP-код → media type → schema</text>
<rect x="85" y="190" width="550" height="140" rx="18" fill="#3730a3" stroke="#a5b4fc" stroke-width="3"/>
<text x="360" y="236" text-anchor="middle" fill="#ffffff" font-size="28" font-family="Arial, sans-serif" font-weight="700">Operation Object</text>
<text x="360" y="274" text-anchor="middle" fill="#e0e7ff" font-size="23" font-family="Arial, sans-serif">GET /orders</text>
<text x="360" y="306" text-anchor="middle" fill="#e0e7ff" font-size="22" font-family="Arial, sans-serif">query: limit, cursor</text>
<path d="M360 330v48" stroke="#c7d2fe" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="140" y="384" width="440" height="128" rx="18" fill="#0f766e" stroke="#5eead4" stroke-width="3"/>
<text x="360" y="430" text-anchor="middle" fill="#ffffff" font-size="28" font-family="Arial, sans-serif" font-weight="700">Responses Object</text>
<text x="360" y="468" text-anchor="middle" fill="#ccfbf1" font-size="23" font-family="Arial, sans-serif">"200" · "400" · "500"</text>
<text x="360" y="496" text-anchor="middle" fill="#ccfbf1" font-size="20" font-family="Arial, sans-serif">код выбирает форму тела</text>
<path d="M360 512v48" stroke="#c7d2fe" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="85" y="566" width="550" height="116" rx="18" fill="#14532d" stroke="#86efac" stroke-width="3"/>
<text x="360" y="610" text-anchor="middle" fill="#ffffff" font-size="28" font-family="Arial, sans-serif" font-weight="700">200 + JSON → OrdersPage</text>
<text x="360" y="648" text-anchor="middle" fill="#dcfce7" font-size="22" font-family="Arial, sans-serif">items и page</text>
<path d="M360 682v36" stroke="#c7d2fe" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="85" y="724" width="550" height="116" rx="18" fill="#7f1d1d" stroke="#fca5a5" stroke-width="3"/>
<text x="360" y="768" text-anchor="middle" fill="#ffffff" font-size="28" font-family="Arial, sans-serif" font-weight="700">400 + problem → Problem</text>
<text x="360" y="806" text-anchor="middle" fill="#fee2e2" font-size="22" font-family="Arial, sans-serif">type, status, errors</text>
<path d="M360 840v42" stroke="#c7d2fe" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="55" y="888" width="610" height="214" rx="18" fill="#1e293b" stroke="#64748b" stroke-width="3"/>
<text x="360" y="934" text-anchor="middle" fill="#ffffff" font-size="27" font-family="Arial, sans-serif" font-weight="700">Schema Object: два разных вопроса</text>
<rect x="86" y="966" width="250" height="92" rx="14" fill="#334155"/>
<text x="211" y="1002" text-anchor="middle" fill="#f8fafc" font-size="23" font-family="Arial, sans-serif" font-weight="700">required</text>
<text x="211" y="1033" text-anchor="middle" fill="#cbd5e1" font-size="20" font-family="Arial, sans-serif">ключ nextCursor есть</text>
<rect x="384" y="966" width="250" height="92" rx="14" fill="#334155"/>
<text x="509" y="1002" text-anchor="middle" fill="#f8fafc" font-size="23" font-family="Arial, sans-serif" font-weight="700">nullable</text>
<text x="509" y="1033" text-anchor="middle" fill="#cbd5e1" font-size="20" font-family="Arial, sans-serif">значение может быть null</text>
<text x="360" y="1088" text-anchor="middle" fill="#cbd5e1" font-size="20" font-family="Arial, sans-serif">отсутствующий ключ и null — не один случай</text>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="8" markerHeight="8" orient="auto-start-reverse">
<path d="M0 0L10 5L0 10z" fill="#c7d2fe"/>
</marker>
</defs>
</svg>