nexmo-oas-renderer 0.11.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +135 -0
  3. data/.travis.yml +1 -0
  4. data/CHANGELOG.md +12 -0
  5. data/Gemfile +2 -2
  6. data/Gemfile.lock +92 -72
  7. data/README.md +8 -0
  8. data/Rakefile +2 -2
  9. data/bin/console +3 -3
  10. data/lib/nexmo/oas/engine.rb +2 -0
  11. data/lib/nexmo/oas/renderer.rb +5 -5
  12. data/lib/nexmo/oas/renderer/app.rb +71 -46
  13. data/lib/nexmo/oas/renderer/config.ru +4 -2
  14. data/lib/nexmo/oas/renderer/decorators/response_parser_decorator.rb +18 -18
  15. data/lib/nexmo/oas/renderer/helpers/navigation.rb +2 -2
  16. data/lib/nexmo/oas/renderer/helpers/render.rb +2 -1
  17. data/lib/nexmo/oas/renderer/helpers/summary.rb +4 -1
  18. data/lib/nexmo/oas/renderer/helpers/url.rb +2 -0
  19. data/lib/nexmo/oas/renderer/presenters/api_specification.rb +2 -1
  20. data/lib/nexmo/oas/renderer/presenters/endpoint.rb +2 -0
  21. data/lib/nexmo/oas/renderer/presenters/groups.rb +4 -0
  22. data/lib/nexmo/oas/renderer/presenters/navigation.rb +2 -0
  23. data/lib/nexmo/oas/renderer/presenters/open_api_specification.rb +5 -2
  24. data/lib/nexmo/oas/renderer/presenters/request_body_raw.rb +141 -0
  25. data/lib/nexmo/oas/renderer/presenters/response_format.rb +4 -2
  26. data/lib/nexmo/oas/renderer/presenters/response_tab/link.rb +3 -0
  27. data/lib/nexmo/oas/renderer/presenters/response_tab/panel.rb +8 -5
  28. data/lib/nexmo/oas/renderer/presenters/response_tabs.rb +6 -2
  29. data/lib/nexmo/oas/renderer/presenters/versions.rb +11 -10
  30. data/lib/nexmo/oas/renderer/public/assets/javascripts/components/format.js +12 -7
  31. data/lib/nexmo/oas/renderer/public/assets/javascripts/nexmo-oas-renderer.js +51 -24
  32. data/lib/nexmo/oas/renderer/public/assets/javascripts/popper.min.js +5 -0
  33. data/lib/nexmo/oas/renderer/public/assets/javascripts/tooltip.min.js +5 -0
  34. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.accordion.js +301 -243
  35. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.tooltip.js +76 -0
  36. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css +255 -823
  37. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css.map +2 -2
  38. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/api.scss +287 -90
  39. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/style.scss +2 -6
  40. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/dark.scss +89 -0
  41. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/light.scss +68 -0
  42. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta-prism.min.css +1 -1
  43. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta.min.css +1 -1
  44. data/lib/nexmo/oas/renderer/services/oas_parser.rb +2 -0
  45. data/lib/nexmo/oas/renderer/services/open_api_definition_resolver.rb +3 -1
  46. data/lib/nexmo/oas/renderer/version.rb +3 -1
  47. data/lib/nexmo/oas/renderer/views/layouts/_head.erb +1 -0
  48. data/lib/nexmo/oas/renderer/views/layouts/_javascripts.erb +5 -4
  49. data/lib/nexmo/oas/renderer/views/layouts/open_api.erb +3 -1
  50. data/lib/nexmo/oas/renderer/views/open_api/_auth.erb +74 -0
  51. data/lib/nexmo/oas/renderer/views/open_api/_available_endpoints.erb +25 -0
  52. data/lib/nexmo/oas/renderer/views/open_api/_callback_endpoint.erb +18 -27
  53. data/lib/nexmo/oas/renderer/views/open_api/_callbacks.erb +5 -0
  54. data/lib/nexmo/oas/renderer/views/open_api/_endpoint.erb +39 -124
  55. data/lib/nexmo/oas/renderer/views/open_api/_header.erb +71 -0
  56. data/lib/nexmo/oas/renderer/views/open_api/_model.erb +31 -26
  57. data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +54 -78
  58. data/lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb +2 -5
  59. data/lib/nexmo/oas/renderer/views/open_api/_parameters.erb +98 -153
  60. data/lib/nexmo/oas/renderer/views/open_api/_request_json.erb +4 -0
  61. data/lib/nexmo/oas/renderer/views/open_api/_request_one_of.erb +70 -0
  62. data/lib/nexmo/oas/renderer/views/open_api/_request_single.erb +53 -0
  63. data/lib/nexmo/oas/renderer/views/open_api/_requests.erb +22 -0
  64. data/lib/nexmo/oas/renderer/views/open_api/_response_description_parameters.erb +88 -90
  65. data/lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb +17 -12
  66. data/lib/nexmo/oas/renderer/views/open_api/_response_fields.erb +1 -16
  67. data/lib/nexmo/oas/renderer/views/open_api/_response_tabs.erb +2 -2
  68. data/lib/nexmo/oas/renderer/views/open_api/_responses.erb +35 -0
  69. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb +15 -4
  70. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_single_parameter.erb +56 -0
  71. data/lib/nexmo/oas/renderer/views/open_api/_webhooks.erb +30 -0
  72. data/lib/nexmo/oas/renderer/views/open_api/show.erb +10 -115
  73. data/nexmo-oas-renderer.gemspec +26 -26
  74. metadata +61 -49
  75. data/lib/nexmo/oas/renderer/public/assets/javascripts/components/scroll.js +0 -21
  76. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/core.scss +0 -137
  77. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/navigation.scss +0 -102
  78. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/nexmo.scss +0 -61
  79. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/syntax.scss +0 -63
  80. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/typography.scss +0 -248
  81. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/volta-templates.scss +0 -119
@@ -1,119 +0,0 @@
1
- @import './variables';
2
- @import './mediaqueries';
3
-
4
- .Vlt-template {
5
- display: flex;
6
- flex-flow: row wrap;
7
- width: 100%;
8
-
9
- &--header {
10
- .Vlt-sidenav__mobile {
11
- @media #{$S-only} {
12
- top: 70px;
13
- z-index: $z-index-sidenav-mobile-trigger;
14
- }
15
- }
16
- }
17
- }
18
-
19
- .Vlt-header {
20
- align-items: center;
21
- background: $white;
22
- box-shadow: 1px 0 8px rgba($black, 0.2);
23
- display: flex;
24
- flex: 0 0 100%;
25
- height: 70px;
26
- justify-content: space-between;
27
- padding: 4px 20px;
28
- transition: height 0.5s;
29
- width: 100%;
30
- z-index: $z-index-header;
31
-
32
- @media #{$S-only} {
33
- position: fixed;
34
- }
35
-
36
- &__logo {
37
- display: block;
38
- flex: 0 0 270px;
39
-
40
- @media #{$S-only} {
41
- flex: 0 0 50px;
42
- }
43
-
44
- img {
45
- height: 40px;
46
- margin: 10px 0;
47
- }
48
- }
49
-
50
- &__menu {
51
- flex: 1;
52
-
53
- &--right {
54
- text-align: right;
55
- }
56
- }
57
-
58
- .Vlt-tabs__header {
59
- border: 0;
60
- }
61
- }
62
-
63
- .Vlt-main {
64
- flex: 1;
65
- height: 100vh;
66
- overflow-y: auto;
67
- padding-bottom: 20px;
68
- padding-left: 10px;
69
- padding-right: 20px;
70
- padding-top: 15px;
71
-
72
- @media #{$S-only} {
73
- padding: 10px;
74
- }
75
-
76
- &--light {
77
- background: $grey-lighter;
78
- }
79
-
80
- .Vlt-template--sidenav & {
81
- @media #{$S-only} {
82
- padding-top: 70px;
83
- }
84
- }
85
-
86
- .Vlt-template--auth & {
87
- align-items: center;
88
- display: flex;
89
- justify-content: center;
90
-
91
- @media #{$S-only} {
92
- padding-top: 100px;
93
- }
94
- }
95
-
96
- .Vlt-template--sidenav.Vlt-template--header & {
97
- @media #{$S-only} {
98
- padding-top: 140px;
99
- }
100
- }
101
-
102
- &__content {
103
- max-height: calc(100vh - 130px);
104
- max-width: 600px;
105
- overflow-y: auto;
106
- text-align: center;
107
-
108
- @media #{$S-only} {
109
- max-height: calc(100vh - 100px);
110
- }
111
- }
112
- }
113
-
114
- .Vlt-template--header .Vlt-sidenav,
115
- .Vlt-template--header .Vlt-main {
116
- @media #{$M-plus} {
117
- height: calc(100vh - 70px);
118
- }
119
- }