Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve README #514

Merged
merged 1 commit into from
Oct 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The grape-swagger gem provides an autogenerated documentation for your [Grape](h

![Demo Screenshot](example/swagger-example.png)

These screenshot is based on the [Hussars](https://github.com/LeFnord/hussars) sample app.
This screenshot is based on the [Hussars](https://github.com/LeFnord/hussars) sample app.

<a name="related" />
## Related Projects
Expand Down Expand Up @@ -157,7 +157,7 @@ GrapeSwagger.model_parsers.insert_before(GrapeSwagger::Representable::Parser, Gr
GrapeSwagger.model_parsers.insert_after(GrapeSwagger::Roar::Parser, GrapeSwagger::Representable::Parser, Representable::Decorator)
```

As we know, `Roar::Decorator` uses as superclass `Representable::Decorator`, this allow to avoid problem when Roar objects will be processed by `GrapeSwagger::Representable::Parser`, instead `GrapeSwagger::Roar::Parser`.
As we know, `Roar::Decorator` uses `Representable::Decorator` as a superclass, this allows to avoid a problem when Roar objects are processed by `GrapeSwagger::Representable::Parser` instead of `GrapeSwagger::Roar::Parser`.


### CORS
Expand All @@ -181,7 +181,7 @@ before do
header['Access-Control-Allow-Origin'] = '*'
header['Access-Control-Request-Method'] = '*'
end
````
```


<a name="configure" />
Expand All @@ -204,10 +204,10 @@ end


You can pass a hash with optional configuration settings to ```add_swagger_documentation```.
The examples shows the default value.
The examples show the default value.


The `host` and `base_path` options also accept a `proc` or `lambda` to evaluate, which is passed a [request](http://www.rubydoc.info/github/rack/rack/Rack/Request) object:
The `host` and `base_path` options also accept a `proc` or a `lambda` to evaluate, which is passed a [request](http://www.rubydoc.info/github/rack/rack/Rack/Request) object:

```ruby
add_swagger_documentation \
Expand Down Expand Up @@ -388,7 +388,7 @@ add_swagger_documentation \
* [Swagger Header Parameters](#headers)
* [Hiding an Endpoint](#hiding)
* [Overriding Auto-Generated Nicknames](#overriding-auto-generated-nicknames)
* [Defining an endpoint as array](#array)
* [Defining an endpoint as an array](#array)
* [Using an options hash](#options)
* [Specify endpoint details](#details)
* [Overriding param type](#overriding-param-type)
Expand Down Expand Up @@ -446,9 +446,9 @@ desc 'Get a full list of pets', nickname: 'getAllPets'


<a name="array" />
#### Defining an endpoint as array
#### Defining an endpoint as an array

You can define an endpoint as array by adding `is_array` in the description:
You can define an endpoint as an array by adding `is_array` in the description:

```ruby
desc 'Get a full list of pets', is_array: true
Expand Down