ParameterTable
Domain · API DocAPI parametrelerini tablo biçiminde listeler. Konum rozeti, tip, zorunluluk ve açıklama sütunları içerir.
| Name | Type | Required | Description |
|---|---|---|---|
| page | integer | Page number (1-based) | |
| pageSize* | integer | required | Items per page |
<%- include('modules/domain/api-doc/ParameterTable', {
parameters: [
{ parameterId: 'p1', name: 'page', in: 'query', schema: { type: 'integer' }, description: 'Page number (1-based)' },
{ parameterId: 'p2', name: 'pageSize', in: 'query', required: true, schema: { type: 'integer' }, description: 'Items per page' },
]
}) %>
<%
var _parameters = locals.parameters || [];
if (!_parameters.length) { return; }
var locationVariant = { path: 'text-primary bg-primary-subtle', query: 'text-info-fg bg-info-subtle', header: 'text-warning-fg bg-warning-subtle', cookie: 'text-text-secondary bg-surface-overlay' };
%>
Name
In
Type
Req
Description
<% _parameters.forEach(function(param) {
var schema = param.schema || {};
var typeStr = schema.type || (schema.$ref ? schema.$ref.split('/').pop() : '—');
var inStyle = locationVariant[param.in] || 'text-text-secondary bg-surface-overlay';
%>
<%= param.name %>
<% if (param.deprecated) { %>deprecated<% } %>
<%= param.in %>
<%= typeStr %><% if (schema.format) { %> (<%= schema.format %>)<% } %>
<% if (param.required) { %>
req
<% } else { %>
opt
<% } %>
<%= param.description || '—' %>
<% if (schema.enum && schema.enum.length) { %>
<% schema.enum.forEach(function(v) { %>
<%= String(v) %>
<% }); %>
<% } %>
<% }); %>