idesigning/yaga-order

dev-master 2018-12-26 12:47 UTC

This package is not auto-updated.

Last update: 2024-04-23 18:26:49 UTC


README

Common schema for Yaga order requests. Swagger

This Symfony bundle is automatically generated by the Swagger Codegen project:

  • API version: 18.40.0
  • Build package: io.swagger.codegen.languages.SymfonyServerCodegen

Requirements

PHP 5.4.0 and later

Installation & Usage

To install the dependencies via Composer, add the following repository to composer.json of your Symfony project:

{
    "repositories": [{
        "type": "path",
        "url": "//Path to your generated swagger bundle"
    }],
}

Then run:

composer require swagger/server-bundle:dev-master

to add the generated swagger bundle as a dependency.

Tests

To run the unit tests for the generated bundle, first navigate to the directory containing the code, then run the following commands:

composer install
./vendor/bin/phpunit

Getting Started

Step 1: Please follow the installation procedure first.

Step 2: Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new YagaOrder\Server\SwaggerServerBundle(),
        // ...
    );
}

Step 3: Register the routes:

# app/config/routing.yml
swagger_server:
    resource: "@SwaggerServerBundle/Resources/config/routing.yml"

Step 4: Implement the API calls:

<?php
// src/Acme/MyBundle/Api/YagaOrderApiInterface.php

namespace Acme\MyBundle\Api;

use YagaOrder\Server\Api\YagaOrderApiInterface;

class YagaOrderApi implements YagaOrderApiInterface // An interface is autogenerated
{

    // Other operation methods ...
}

Step 5: Tag your API implementation:

# src/Acme/MyBundle/Resources/services.yml
services:
    # ...
    acme.my_bundle.api.yagaOrder:
        class: Acme\MyBundle\Api\YagaOrderApi
        tags:
            - { name: "swagger_server.api", api: "yagaOrder" }
    # ...

Now you can start using the bundle!

Documentation for API Endpoints

All URIs are relative to https://localhost

ClassMethodHTTP requestDescription
YagaOrderApiInterfacebookTicketsPOST /book
YagaOrderApiInterfacecancelPayedReservationPOST /cancel-order
YagaOrderApiInterfaceclearReservationPOST /clear-reservation
YagaOrderApiInterfacegetOrderPOST /order-info
YagaOrderApiInterfacegetOrderStatusPOST /order-status
YagaOrderApiInterfacegetSessionSeatsGET /available-seats
YagaOrderApiInterfacegetTicketPdfGET /pdf/{ticketId}
YagaOrderApiInterfacerefundNotifyPOST /refund-notify
YagaOrderApiInterfacereserveTicketsPOST /reserve
YagaOrderApiInterfacesaleApprovePOST /approve

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author