OperationPanel
Domain · API DocTam API operasyonunu gösterir: Parametreler, Request Body, Responses ve Code Samples bölümleri details/summary ile katlanabilir.
Returns a paginated list of products.
Products
BearerAuth
Parameters 3
<%
var _operation = locals.operation || {};
var _params = _operation.parameters || [];
var _responses = _operation.responses || [];
var _tags = _operation.tags || [];
var _samples = _operation.codeSamples || [];
var _security = _operation.security || [];
var _reqBody = _operation.requestBody || null;
var pathParams = _params.filter(function(p) { return p.in === 'path'; });
var queryParams = _params.filter(function(p) { return p.in === 'query'; });
var headerParams = _params.filter(function(p) { return p.in === 'header'; });
var cookieParams = _params.filter(function(p) { return p.in === 'cookie'; });
var reqBodyContent = _reqBody && _reqBody.content ? Object.entries(_reqBody.content) : [];
var hasSamples = _samples.length > 0;
/* Unique namespace for this tab group — based on operationId */
var ns = 'opt-' + (_operation.operationId || ('x' + Math.random().toString(36).slice(2))).replace(/[^a-z0-9]/gi, '-');
%>
<% if (_operation.deprecated) { %>
This operation is deprecated.
<% } %>
<% if (_operation.description) { %>
<%= _operation.description %>
<% } %>
<% _tags.forEach(function(tag) { %>
<%= tag %>
<% }); %>
<% _security.forEach(function(scheme) {
var schemeName = Object.keys(scheme)[0] || '';
%>
<%= schemeName %>
<% }); %>
<% if (hasSamples) { %>
<% } %>
<% if (hasSamples) { %>
<% } %>
<% if (!_params.length) { %>
No parameters.
<% } %>
<% if (pathParams.length > 0) { %>
Path
<%- include('./ParameterTable', { parameters: pathParams }) %>
<% } %>
<% if (queryParams.length > 0) { %>
Query
<%- include('./ParameterTable', { parameters: queryParams }) %>
<% } %>
<% if (headerParams.length > 0) { %>
Headers
<%- include('./ParameterTable', { parameters: headerParams }) %>
<% } %>
<% if (cookieParams.length > 0) { %>
Cookies
<%- include('./ParameterTable', { parameters: cookieParams }) %>
<% } %>
<% if (!_reqBody) { %>
No request body.
<% } else { %>
<% if (_reqBody.description) { %>
<%= _reqBody.description %>
<% } %>
<% reqBodyContent.forEach(function(entry) {
var mime = entry[0];
var obj = entry[1];
%>
<%= mime %>
<% if (obj.schema) { %>
<%- include('./SchemaViewer', { schema: obj.schema }) %>
<% } %>
<% }); %>
<% } %>
<% if (!_responses.length) { %>
No responses defined.
<% } %>
<% _responses.forEach(function(res) { %>
<%- include('./ResponseCard', { response: res, defaultOpen: res.statusCode && res.statusCode.startsWith('2') }) %>
<% }); %>
<% if (hasSamples) { %>
<%- include('./CodeSamplePanel', { samples: _samples }) %>
<% } %>