PHPackages                             avency/neos-openapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. avency/neos-openapi

ActiveNeos-package[HTTP &amp; Networking](/categories/http)

avency/neos-openapi
===================

OpenApi Basic package with swagger ui rendering

1.0.0(6y ago)3950MITCSS

Since Dec 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/avency/Avency.Neos.OpenApi)[ Packagist](https://packagist.org/packages/avency/neos-openapi)[ Docs](https://github.com/avency/Avency.Neos.OpenApi)[ RSS](/packages/avency-neos-openapi/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Avency Neos OpenAPI
===================

[](#avency-neos-openapi)

This package contains basics to generate an interactive OpenAPI documentation for a RESTful API using doctrine annotations.

It contains a controller that renders a swagger ui and which gets its input from a json-file generated based on the OpenAPI annotations in the projects' files.

It uses the `sintbert/swagger-php` package.

Calling the documentation
-------------------------

[](#calling-the-documentation)

### Backend

[](#backend)

There is a backend module accessible as administrator, which renders the swagger UI.

### Frontend

[](#frontend)

To call the documentation in the frontend, you need to be logged in in the backend as administrator. Then you can call the api:

```
{PROJECT_BASE_URI}/neos/api/documentation.html

```

To access just the generated json which is used to fill the Swagger UI, you can directly call the json file:

```
{PROJECT_BASE_URI}/neos/api/documentation.json

```

Writing the documentation
-------------------------

[](#writing-the-documentation)

### Files to consider for documentation

[](#files-to-consider-for-documentation)

There is the possibility to specify the folder(s), which need to be considered for generating the documentation. The default is set to

```
FLOW_PATH_ROOT/LocalPackages

```

To change this, just change the Settings:

```
Avency:
  Neos:
    OpenApi:
      scanPath: {NEW_PATH}

```

### Import Statement

[](#import-statement)

All files in which Annotations for the Documentation are added need to use the following statement

```
use OpenApi\Annotations as OA;

```

### Annotations

[](#annotations)

#### Info

[](#info)

Need to be added in a separate file and contains general information about the api for example:

```
/**
 * @OA\Info(
 *   version="0.1.0",
 *   title="Portal Api",
 *   description="This is a the documentation for the API which is used in the admin panel."
 * )
 */

```

#### Tag

[](#tag)

A tag serves as group in which the different api endpoints can be grouped in.

It should be defined in top of the distinct controllers.

The tag can be referenced in the different operations.

```
/**
 * @OA\Tag(
 *   name="portal user",
 *   description="Everything about frontend portal users"
 * )
 */

```

#### Operations

[](#operations)

There are different operations available to describe the different api endpoints, like `@OA\Get`, `@OA\Post`, `@OA\Put` or `@OA\Delete`.

They should be each defined in the method description.

They contain a `path`, a brief `summary` and a `description`. `@OA\Parameters` can be added, if the url accepts parameters. The `@OA\Response` defines the different response codes.

```
/**
 *  @OA\Get(
 *    path="/api/v1/portaluser",
 *    summary="Find portal user by identifier",
 *    description="Returns user data for the given DB identifier or the specific value for a property",
 *    tags={"portal user"},
 *    @OA\Parameter(
 *      name="identifier",
 *      in="query",
 *      description="Identifier of user object",
 *      required=true,
 *      @OA\Schema(
 *        type="string",
 *        @OA\Items(type="string"),
 *      )
 *    ),
 *    @OA\Response(
 *      response=200,
 *      description="successful operation, returns user data",
 *      @OA\JsonContent(
 *        ref="#/components/schemas/User",
 *        type="object",
 *        @OA\Items(ref="#/components/schemas/User")
 *      ),
 *    ),
 *    @OA\Response(
 *      response="500",
 *      description="error - identifier was not passed as string, any portal user found by identifier",
 *    )
 *  )
 */

```

#### Schema

[](#schema)

The schema describes a representation of a model.

The annotation should be added on the domain model. The `schema`-attribute is taken by the class name, but can be overwritten or set, if a special schema is defined outside of a domain model.

They contain a `title` and a brief `description`. If necessary, special `@OA\Property` values can be defined, if the schema should represent more than the in the class defined variables, like the identifier.

```
/**
 * @OA\Schema(
 *   schema="User",
 *   title="User model",
 *   description="User model with all user related data",
 *   @OA\Xml(
 *     name="User"
 *   ),
 *   @OA\Property(
 *     property="identifier",
 *     description="db-identifier",
 *     title="identifier",
 *     example="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
 *     type="string"
 *   )
 * )
 */

```

#### Property

[](#property)

The property describes a single property in a model. The annotation should be added close to the property.

Some information about type does not need to be explicitly defined but is for example taken from the type of the property.

```
/**
 * @OA\Property(
 *     description="Last Name",
 *     title="Last Name",
 *     example="Mustermann"
 * )
 *
 * @var string
 * @ORM\Column(nullable=TRUE)
 */
protected $lastName;

```

It is also possible to refer to other Schema objects. This will be also detected by the property type, if there is an other schema for this type.

```
/**
 * @OA\Property(
 *     description="Address",
 *     title="Address"
 * )
 *
 * @ORM\OneToOne(cascade={"persist", "remove"})
 * @ORM\Column(nullable=TRUE)
 * @var Address
 */
protected $defaultAddress;

```

References can be also added manually.

```
@OA\Items(ref="#/components/schemas/Address")

```

More Information
----------------

[](#more-information)

Other parameters or annotations are available. More information can be found on the OpenAPI Specification website:

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2349d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f2f7e4940fc539ff0fdf77ccd2e30d5dfe98dd3228cf52ac05aca355b719981?d=identicon)[gerdemann](/maintainers/gerdemann)

---

Top Contributors

[![gerdemann](https://avatars.githubusercontent.com/u/690536?v=4)](https://github.com/gerdemann "gerdemann (4 commits)")[![lhortmann](https://avatars.githubusercontent.com/u/31652404?v=4)](https://github.com/lhortmann "lhortmann (1 commits)")

---

Tags

neoscmsopenapiswaggerapirestdocumentationswaggeropenapiflowNeosrestapiswagger-ui

### Embed Badge

![Health badge](/badges/avency-neos-openapi/health.svg)

```
[![Health](https://phpackages.com/badges/avency-neos-openapi/health.svg)](https://phpackages.com/packages/avency-neos-openapi)
```

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k48.1M236](/packages/api-platform-core)[vyuldashev/laravel-openapi

Generate OpenAPI Specification for Laravel Applications

4571.2M](/packages/vyuldashev-laravel-openapi)[noitran/opendox

OpenApi(Swagger) 3.0 package for Lumen 5.5+ and Laravel 5.5+ with REDOC UI and SwaggerUI 3

2313.9k](/packages/noitran-opendox)[tartanlegrand/laravel-openapi

Generate OpenAPI Specification for Laravel Applications

38178.7k2](/packages/tartanlegrand-laravel-openapi)[vanderlee/swaggergen

Generate Swagger/OpenAPI documentation from simple PHPdoc-like comments in PHP source code.

42127.9k3](/packages/vanderlee-swaggergen)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
