Skip to content

Instantly share code, notes, and snippets.

@llupa
llupa / SwaggerUiProcessor.php
Last active January 21, 2025 08:54
selectively_hide_or_show_some_of_the_endpoints.php
<?php
use ApiPlatform\OpenApi\Model\Paths;
use ApiPlatform\State\ProcessorInterface;
use ApiPlatform\Symfony\Bundle\SwaggerUi\SwaggerUiProcessor as DecoratedProcessor;
#[AsDecorator('api_platform.swagger_ui.processor')]
readonly class SwaggerUiProcessor implements ProcessorInterface
{
public function __construct(private DecoratedProcessor $decorated)
@llupa
llupa / readme.md
Last active September 13, 2023 13:38
Team agreement on test categorisation

Introduction

I am writting this gist for two reasons:

  • I promised I will write it. Hey Dazz 👋
  • It seems that more than 1 (one) person has found this an interesting approach

A small preface: This was applied in an API project built with Symfony (API Platform). That is, there was no front-end, or HTML responses. This API project supports only json or json-ld. Our tests used the Symfony test-pack (PHPUnit and some Symfony helper classes).