nexmo-oas-renderer 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56cc2167d6d0b24cd7b8ec43a8c91a90114095bd75a2e3a6c147d8e4e76fc29c
4
- data.tar.gz: 43d33b5db76b3fa4a491c2a81a0a84772d06e7f18fc415d71b25cb6ca39aafe3
3
+ metadata.gz: b851f13c8369bb28d71c4b0c6ec1fd9f000727b5eb361da8740fa7bae22e74db
4
+ data.tar.gz: 5c516341b40d8dc5b0992456539367489b3298c08882a1aa425d8a5ed28331cd
5
5
  SHA512:
6
- metadata.gz: dab7e9108f8c5d5c276e503d35344955028ebec7f83976c3748ef0b87e4f3bb40732f5fbdecdf53feed0800489ba405c21d18dceee223d3e3c53bda3e8017c97
7
- data.tar.gz: 7fe3dba4854185b4bff399b5cd673f571781027695b876bc22a0faca2cea51321063fea1e64c17e221ca7e79e44e168df13d4907caac9f29a0fe3df9319014b6
6
+ metadata.gz: c65dea2d20a585ba768cd3898c20e90c8684e14631ebab025a7a8f381576cd4d7b3d9732b78985a249b74c31a1bcb2bd23a2840b9d2fe750a3fe0c17f45a1c4d
7
+ data.tar.gz: b7ebc350a3aec9cbc0e208b51051b2d8a7b6871f8a2e5cab0b56c243a96f269504ce49587cb66f2ecbcb8a0318869b9dc9c9e1cdbcc866f1d129ec381d2c16d8
@@ -0,0 +1,19 @@
1
+ name: Publish Docker
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ tags:
7
+ - '*'
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@master
13
+ - name: Publish to Registry
14
+ uses: elgohr/Publish-Docker-Github-Action@master
15
+ with:
16
+ name: nexmodev/nexmo-oas-renderer
17
+ username: ${{ secrets.DOCKER_USERNAME }}
18
+ password: ${{ secrets.DOCKER_PASSWORD }}
19
+ tag_names: true
@@ -1,3 +1,6 @@
1
+ # 0.7.1
2
+ * Use schema's description when there isn't one at the parameter level
3
+
1
4
  # 0.7.0
2
5
  * Prevent sinatra from showing error traces, use custom 500 page instead
3
6
  * Bump oas_parser to version 0.23.0. Ensures interoperability between JSON and YAML formats by forcing keys to be strings
@@ -0,0 +1,6 @@
1
+ FROM ruby:2.6
2
+ COPY . /
3
+ RUN gem install bundler
4
+ RUN bundle install
5
+ EXPOSE 4567
6
+ ENTRYPOINT ["bundle", "exec", "/exe/nexmo-oas-renderer"]
@@ -124,7 +124,7 @@ GEM
124
124
  octicons (= 8.5.0)
125
125
  rails
126
126
  public_suffix (4.0.1)
127
- rack (2.0.7)
127
+ rack (2.0.8)
128
128
  rack-protection (2.0.7)
129
129
  rack
130
130
  rack-test (1.1.0)
data/README.md CHANGED
@@ -3,6 +3,7 @@ Sinatra application that provides a preview of how the OAS documents will be ren
3
3
 
4
4
  * [Dependencies](#requirements)
5
5
  * [Installation and Usage](#installation-and-usage)
6
+ * [Using Docker](#using-docker)
6
7
  * [As a standalone application](#as-a-standalone-application)
7
8
  * [Mounted into a Rails application](#mounted-into-a-rails-application)
8
9
  * [Specifying the path to the documents](#specifying-the-path-to-the-documents)
@@ -14,6 +15,22 @@ Sinatra application that provides a preview of how the OAS documents will be ren
14
15
 
15
16
  ## Installation and Usage
16
17
 
18
+ ### Using Docker
19
+
20
+ You can run using Docker and it will serve the current directory (this will usually be the api-specification repo):
21
+
22
+ ```bash
23
+ docker run --rm -p 4567:4567 -v `pwd`:/definitions -e 'OAS_PATH=/definitions' nexmodev/nexmo-oas-renderer:latest
24
+ ```
25
+
26
+ Alternatively, add the following to your `~/.bashrc` file and you'll be able to run `nexmo-oas-renderer`
27
+
28
+ ```
29
+ function nexmo-oas-renderer() {
30
+ docker run --rm -p 4567:4567 -v `pwd`:/definitions -e 'OAS_PATH=/definitions' nexmodev/nexmo-oas-renderer:latest
31
+ }
32
+ ```
33
+
17
34
  ### As a standalone application
18
35
 
19
36
  Install the gem:
@@ -32,7 +32,8 @@ module Nexmo
32
32
  end
33
33
 
34
34
  set :mustermann_opts, { type: :rails }
35
- set :oas_path, (ENV['OAS_PATH'] || '.')
35
+ set :oas_path, (ENV['OAS_PATH'] || './')
36
+ set :bind, '0.0.0.0'
36
37
 
37
38
  helpers do
38
39
  include Helpers::Render
@@ -1,7 +1,7 @@
1
1
  module Nexmo
2
2
  module OAS
3
3
  module Renderer
4
- VERSION = "0.7.0"
4
+ VERSION = "0.7.1"
5
5
  end
6
6
  end
7
7
  end
@@ -75,10 +75,10 @@
75
75
  <td>
76
76
  <% if parameter.collection? || parameter.oneOf? %>
77
77
  <% if parameter.raw['x-nexmo-developer-collection-description-shown'] %>
78
- <%= (parameter.description ? "#{parameter.description}" : '<i>None</i>').render_markdown %>
78
+ <%= (parameter.description || parameter.schema['description'] || '<i>None</i>').render_markdown %>
79
79
  <% end %>
80
80
  <% else %>
81
- <%= (parameter.description ? "#{parameter.description}" : '<i>None</i>').render_markdown %>
81
+ <%= (parameter.description || parameter.schema['description'] || '<i>None</i>').render_markdown %>
82
82
  <% end %>
83
83
 
84
84
  <% if parameter.enum %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexmo-oas-renderer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabian Rodriguez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-13 00:00:00.000000000 Z
11
+ date: 2020-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -229,10 +229,12 @@ extensions: []
229
229
  extra_rdoc_files: []
230
230
  files:
231
231
  - ".env.example"
232
+ - ".github/workflows/push-docker-publish.yml"
232
233
  - ".gitignore"
233
234
  - ".rspec"
234
235
  - CHANGELOG.md
235
236
  - CONTRIBUTING.md
237
+ - Dockerfile
236
238
  - Gemfile
237
239
  - Gemfile.lock
238
240
  - LICENSE.txt