Add sandbox/live environments to API doc, update TASK_CHECKUP for JWT auth
API doc:
- Add sandbox (/api/sandbox) and live (/api/live) environments with badges
- Auth (/api/auth/login) is shared between environments
- Endpoint paths show both prefixes: /api/sandbox|/api/live/...
- Auth endpoints show path without prefix
TASK_CHECKUP:
- Replace API key auth with JWT auth (ETicket-Email + ETicket-JWT headers)
- All routes use {env} prefix (sandbox/live)
- /mon-compte API tab redirects to /api/doc
- Sandbox: read-only mode (POST/PATCH/DELETE return result without DB modification)
- Mark documentation tasks as done
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,10 +16,6 @@
|
||||
<p class="text-lg font-bold text-gray-300 max-w-2xl">Documentation complete de l'API REST pour les organisateurs. Gestion des evenements, commandes, billets et scan.</p>
|
||||
|
||||
<div class="mt-8 flex flex-wrap gap-4">
|
||||
<div class="border-2 border-gray-700 bg-gray-800 px-4 py-3">
|
||||
<p class="text-[10px] font-black uppercase tracking-widest text-gray-500 mb-1">Base URL</p>
|
||||
<p class="font-mono font-bold text-sm text-[#fabf04]">https://ticket.e-cosplay.fr/api</p>
|
||||
</div>
|
||||
<div class="border-2 border-gray-700 bg-gray-800 px-4 py-3">
|
||||
<p class="text-[10px] font-black uppercase tracking-widest text-gray-500 mb-1">Format</p>
|
||||
<p class="font-mono font-bold text-sm">JSON (application/json)</p>
|
||||
@@ -30,6 +26,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
{% for env in environments %}
|
||||
<div class="border-2 border-gray-700 bg-gray-800 p-4">
|
||||
<div class="flex items-center gap-2 mb-2">
|
||||
<span class="{{ env.badgeColor }} text-white text-[10px] font-black uppercase tracking-widest px-2 py-0.5">{{ env.badge }}</span>
|
||||
<span class="font-black text-sm uppercase tracking-tighter">{{ env.name }}</span>
|
||||
</div>
|
||||
<p class="font-mono font-bold text-sm text-[#fabf04] mb-2">https://ticket.e-cosplay.fr{{ env.baseUrl }}</p>
|
||||
<p class="text-xs font-bold text-gray-400">{{ env.description }}</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<p class="mt-4 text-xs font-bold text-gray-400">L'authentification (<span class="font-mono">/api/auth/login</span>) est commune aux deux environnements : <span class="font-mono text-[#fabf04]">https://ticket.e-cosplay.fr/api/auth/login</span></p>
|
||||
|
||||
<div class="mt-8">
|
||||
<a href="{{ path('app_api_doc_json') }}" target="_blank" class="inline-flex items-center gap-2 px-6 py-3 border-4 border-[#fabf04] bg-[#fabf04] text-gray-900 font-black uppercase text-xs tracking-widest shadow-[6px_6px_0px_rgba(0,0,0,1)] hover:shadow-[8px_8px_0px_rgba(0,0,0,1)] hover:translate-y-[-2px] transition-all">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg>
|
||||
@@ -130,8 +141,12 @@
|
||||
<div class="{{ method_colors[endpoint.method] ?? 'bg-gray-600' }} text-white px-4 py-3 flex items-center min-w-[80px] justify-center">
|
||||
<span class="font-black text-xs tracking-widest">{{ endpoint.method }}</span>
|
||||
</div>
|
||||
<div class="flex-1 bg-gray-900 text-white px-4 py-3 flex items-center">
|
||||
<code class="font-mono font-bold text-sm">{{ endpoint.path }}</code>
|
||||
<div class="flex-1 bg-gray-900 text-white px-4 py-3 flex items-center gap-2 flex-wrap">
|
||||
{% if endpoint.path starts with '/api/auth' %}
|
||||
<code class="font-mono font-bold text-sm">{{ endpoint.path }}</code>
|
||||
{% else %}
|
||||
<code class="font-mono font-bold text-sm"><span class="text-orange-400">/api/sandbox</span><span class="text-gray-500">|</span><span class="text-green-400">/api/live</span>{{ endpoint.path|replace({'/api': ''}) }}</code>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user