Skip to content

Commit 54726fd

Browse files
authored
Merge pull request #308 from shalvah/release
Pre-release (added changelog and updated docs)
2 parents fdc62b5 + 087cf19 commit 54726fd

File tree

3 files changed

+47
-7
lines changed

3 files changed

+47
-7
lines changed

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). If you make a pull request to this project, please update this changelog.
6+
7+
## Unreleased
8+
### Added
9+
10+
### Changed
11+
12+
### Fixed
13+
14+
### Removed
15+
16+
## [2.1.0] - 2018-09-00
17+
### Added
18+
- Added support for multiple route domains (https://github.com/mpociot/laravel-apidoc-generator/pull/255)
19+
- Added support for descriptions in custom validation rules (https://github.com/mpociot/laravel-apidoc-generator/pull/208)
20+
- Added support for multiple route prefixes (https://github.com/mpociot/laravel-apidoc-generator/pull/203)
21+
- Added support for formatting and `<aside>` tags (https://github.com/mpociot/laravel-apidoc-generator/pull/261)
22+
- Support for Laravel 5.5 auto-discovery (https://github.com/mpociot/laravel-apidoc-generator/pull/217)
23+
24+
### Changed
25+
- Response calls are now only made when route is GET (https://github.com/mpociot/laravel-apidoc-generator/pull/279)
26+
- Validator factory is now passed to `FormRequest::validator` method (https://github.com/mpociot/laravel-apidoc-generator/pull/236)
27+
- Bind optional model parameters in routes (https://github.com/mpociot/laravel-apidoc-generator/pull/297/)
28+
- HEAD routes are no longer automatically generated for GET routes (https://github.com/mpociot/laravel-apidoc-generator/pull/180)
29+
- `actAsUserId` option is no longer cast to an int (https://github.com/mpociot/laravel-apidoc-generator/pull/257)
30+
31+
### Fixed
32+
- `useMiddleware` option is now actually used (https://github.com/mpociot/laravel-apidoc-generator/pull/297/)
33+
- Changes to the info vendor view are now persisted (https://github.com/mpociot/laravel-apidoc-generator/pull/120)
34+
- Fixed memory leak issues (https://github.com/mpociot/laravel-apidoc-generator/pull/256)
35+
- Fixed issues with validating array parameters (https://github.com/mpociot/laravel-apidoc-generator/pull/299)
36+
- `@response` tag now parses content correctly as JSON (https://github.com/mpociot/laravel-apidoc-generator/pull/271)
37+
38+
### Removed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ If the project maintainer has any additional requirements, you will find them li
4444

4545
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
4646

47-
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. Add your changes to the `CHANGELOG.md` under the "Unreleased" section.
4848

4949
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
5050

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ Route::group(array('prefix' => 'api/v1', 'middleware' => []), function () {
6161
Option | Description
6262
--------- | -------
6363
`output` | The output path used for the generated documentation. Default: `public/docs`
64-
`routePrefix` | The route prefix to use for generation - `*` can be used as a wildcard
65-
`routes` | The route names to use for generation - Required if no routePrefix is provided
64+
`routePrefix` | The route prefix(es) to use for generation. `*` can be used as a wildcard. Multiple route prefixes can be specified by separating them with a comma (for instance `/v1,/v2`)
65+
`routeDomain` | The route domain(s) to use for generation. `*` can be used as a wildcard. Multiple route domains can be specified by separating them with a comma
66+
`routes` | The route names to use for generation - Required if no routePrefix or routeDomain is provided
6667
`middleware` | The middlewares to use for generation
6768
`noResponseCalls` | Disable API response calls
6869
`noPostmanCollection` | Disable Postman collection creation
@@ -92,7 +93,7 @@ This package uses these resources to generate the API documentation:
9293

9394
This package uses the HTTP controller doc blocks to create a table of contents and show descriptions for your API methods.
9495

95-
Using `@resource` in a doc block prior to each controller is useful as it creates a Group within the API documentation for all methods defined in that controller (rather than listing every method in a single list for all your controllers), but using `@resource` is not required. The short description after the `@resource` should be unique to allow anchor tags to navigate to this section. A longer description can be included below.
96+
Using `@resource` in a doc block prior to each controller is useful as it creates a Group within the API documentation for all methods defined in that controller (rather than listing every method in a single list for all your controllers), but using `@resource` is not required. The short description after the `@resource` should be unique to allow anchor tags to navigate to this section. A longer description can be included below. Custom formatting and `<aside>` tags are also supported. (see the [Documentarian docs](http://marcelpociot.de/documentarian/installation/markdown_syntax))
9697

9798
Above each method within the controller you wish to include in your API documentation you should have a doc block. This should include a unique short description as the first entry. An optional second entry can be added with further information. Both descriptions will appear in the API documentation in a different format as shown below.
9899

@@ -176,13 +177,14 @@ public function transformerCollectionTag()
176177
The @transformermodel tag is needed for PHP 5.* to get the model. For PHP 7 is it optional to specify the model that is used for the transformer.
177178

178179
#### @response
179-
If you expliciet want to specify the result of a function you can set it in the docblock
180+
If you explicitly want to specify the result of a function you can set it in the docblock as JSON, using the `@response` annotation:
180181

181182
```php
182183
/**
183184
* @response {
184-
* data: [],
185-
*}
185+
* "token": "eyJ0eXAi…",
186+
* "roles": ["admin"]
187+
* }
186188
*/
187189
public function responseTag()
188190
{

0 commit comments

Comments
 (0)