Download the PHP package g4t/swagger without Composer

On this page you can find all versions of the php package g4t/swagger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
g4t/swagger
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package swagger

Swagger Laravel Autogenerate Package

The Swagger Laravel Autogenerate Package automatically generates OpenAPI (Swagger) documentation for your Laravel APIs from route definitions, validation rules, and optional controller inference—so you spend less time maintaining specs by hand.

Documentation: https://swagger.g4t.io/

Features

Installation

Usage

Video walkthrough

Explanatory video on how to use

  1. Publish the configuration file:

  2. Adjust config/swagger.php (title, URL prefix, versions, inference flags, cached_spec_path / use_cached_spec_when_present, etc.).

  3. Open the UI at /{swagger.url} (default: /swagger/documentation), e.g. https://your-app.test/swagger/documentation.

  4. The issues page route is configured via swagger.issues_url (default: /swagger/issues).

  5. Describe a route:

  6. Short summary on the route:

  7. Hide an endpoint from the docs:

  8. Controller section description:

  9. Documentation basic auth (config/swagger.php):

Artisan commands

Command What it does
make:swagger Writes OpenAPI JSON to public/{cached_spec_path} (default doc.json). Legacy name; same destination as swagger:cache.
swagger:cache Regenerates and writes the cached spec to public/{cached_spec_path}, or swagger:cache --clear removes that file. Skips generation when swagger.enable is false (clear still works).
swagger:mock-server Optional G4T mock workflow (experimental).

Mock server (experimental)

G4T provides an optional command that connects your auto-generated API documentation to a hosted mock experience run by G4T. The goal is to make it easier to explore or demo your API surface while you build—without you having to host that side yourself.

Experimental: This feature is under testing. It may change, pause, or evolve without much advance notice. Do not rely on it for business-critical production paths yet.

Run:


OpenAPI export & caching

make:swagger

Regenerates the spec from the current application routes and writes:

Run after changing routes, controllers, FormRequests, or resources when you rely on a cached file for the JSON endpoint.

swagger:cache

Same write target and encoding as make:swagger, with an extra clear option:

Use --clear to delete the cached file without regenerating. Regeneration requires swagger.enable to be true.

JSON endpoint behavior

The /{swagger.url}/json response is resolved by DocumentationController::resolveSwaggerSpecification():

load_from_json Behavior
true Only the file at public/{cached_spec_path} is used; missing/invalid file → empty array [].
false If use_cached_spec_when_present is true (default) and the file exists with valid JSON, that file is served; otherwise the spec is built live from routes.

Config / env (defaults apply if keys are missing from an older published config):

Suggestions

Feature requests: Canny board.

Contributing

Issues and pull requests are welcome on GitHub.

License

Open-source under the MIT license.

Credits

Maintained by HusseinAlaa.

Additional resources


All versions of swagger with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package g4t/swagger contains the following files

Loading the files please wait ...