Category: swagger

Api plateform denormalization on custom operation problem

I have an entity Voucher that contain a custom operation name add_voucher: <?php /** * @ApiResource( * collectionOperations={ * "add_voucher"={ * "access_control"="is_granted(‘ROLE_COMMERCIAL’)", * "method"="POST", * "path"="/vouchers/add-new", * "controller"=AddVoucherAction::class, * "denormalization_context"={ * "groups"={"add_new_voucher"} * }, * "validation_groups"={"Default", "add_voucher_validation"} * }, *…

Is there a way to add a context for my methods (or exclude methods) in Swagger?

I have REST API, some methods are public, some methods are private. I want to generate two API docs, one for everybody and another one for private usage. I use https://github.com/nelmio/NelmioApiDocBundle which uses https://github.com/zircote/swagger-php which uses Swagger 2. A good…

API-Platform: Multiple primary key with swagger – getting error

This question on GitHub I’m trying to add second field into parameters without custom controller for entity with multiple primary key and getting error … Now step-by-step: DB table: create table measure_types ( id varchar(10) not null, language_iso_code varchar(2) not…