nexmo-oas-renderer 0.11.3 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +135 -0
  3. data/.travis.yml +1 -0
  4. data/Gemfile +1 -1
  5. data/Gemfile.lock +82 -62
  6. data/Rakefile +2 -2
  7. data/bin/console +3 -3
  8. data/lib/nexmo/oas/engine.rb +2 -0
  9. data/lib/nexmo/oas/renderer.rb +5 -5
  10. data/lib/nexmo/oas/renderer/app.rb +70 -45
  11. data/lib/nexmo/oas/renderer/config.ru +4 -2
  12. data/lib/nexmo/oas/renderer/decorators/response_parser_decorator.rb +18 -18
  13. data/lib/nexmo/oas/renderer/helpers/navigation.rb +2 -2
  14. data/lib/nexmo/oas/renderer/helpers/render.rb +2 -1
  15. data/lib/nexmo/oas/renderer/helpers/summary.rb +4 -1
  16. data/lib/nexmo/oas/renderer/helpers/url.rb +2 -0
  17. data/lib/nexmo/oas/renderer/presenters/api_specification.rb +12 -3
  18. data/lib/nexmo/oas/renderer/presenters/endpoint.rb +2 -0
  19. data/lib/nexmo/oas/renderer/presenters/groups.rb +4 -0
  20. data/lib/nexmo/oas/renderer/presenters/navigation.rb +2 -0
  21. data/lib/nexmo/oas/renderer/presenters/open_api_specification.rb +5 -2
  22. data/lib/nexmo/oas/renderer/presenters/request_body_raw.rb +141 -0
  23. data/lib/nexmo/oas/renderer/presenters/response_format.rb +4 -2
  24. data/lib/nexmo/oas/renderer/presenters/response_tab/link.rb +3 -0
  25. data/lib/nexmo/oas/renderer/presenters/response_tab/panel.rb +8 -5
  26. data/lib/nexmo/oas/renderer/presenters/response_tabs.rb +6 -2
  27. data/lib/nexmo/oas/renderer/presenters/versions.rb +11 -10
  28. data/lib/nexmo/oas/renderer/public/assets/javascripts/components/format.js +12 -7
  29. data/lib/nexmo/oas/renderer/public/assets/javascripts/nexmo-oas-renderer.js +59 -23
  30. data/lib/nexmo/oas/renderer/public/assets/javascripts/popper.min.js +5 -0
  31. data/lib/nexmo/oas/renderer/public/assets/javascripts/tooltip.min.js +5 -0
  32. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.accordion.js +301 -243
  33. data/lib/nexmo/oas/renderer/public/assets/javascripts/volta.tooltip.js +76 -0
  34. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css +255 -823
  35. data/lib/nexmo/oas/renderer/public/assets/stylesheets/nexmo-oas-renderer.css.map +2 -2
  36. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/api.scss +287 -90
  37. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/style.scss +2 -6
  38. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/dark.scss +89 -0
  39. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/themes/light.scss +68 -0
  40. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta-prism.min.css +1 -1
  41. data/lib/nexmo/oas/renderer/public/assets/stylesheets/volta.min.css +1 -1
  42. data/lib/nexmo/oas/renderer/services/oas_parser.rb +2 -0
  43. data/lib/nexmo/oas/renderer/services/open_api_definition_resolver.rb +3 -1
  44. data/lib/nexmo/oas/renderer/version.rb +3 -1
  45. data/lib/nexmo/oas/renderer/views/layouts/_head.erb +1 -0
  46. data/lib/nexmo/oas/renderer/views/layouts/_javascripts.erb +5 -4
  47. data/lib/nexmo/oas/renderer/views/layouts/open_api.erb +3 -1
  48. data/lib/nexmo/oas/renderer/views/open_api/_auth.erb +74 -0
  49. data/lib/nexmo/oas/renderer/views/open_api/_available_endpoints.erb +25 -0
  50. data/lib/nexmo/oas/renderer/views/open_api/_callback_endpoint.erb +18 -27
  51. data/lib/nexmo/oas/renderer/views/open_api/_callbacks.erb +5 -0
  52. data/lib/nexmo/oas/renderer/views/open_api/_endpoint.erb +39 -124
  53. data/lib/nexmo/oas/renderer/views/open_api/_header.erb +71 -0
  54. data/lib/nexmo/oas/renderer/views/open_api/_model.erb +31 -26
  55. data/lib/nexmo/oas/renderer/views/open_api/_navigation.erb +54 -78
  56. data/lib/nexmo/oas/renderer/views/open_api/_parameter_groups.erb +2 -5
  57. data/lib/nexmo/oas/renderer/views/open_api/_parameters.erb +98 -169
  58. data/lib/nexmo/oas/renderer/views/open_api/_request_json.erb +4 -0
  59. data/lib/nexmo/oas/renderer/views/open_api/_request_one_of.erb +70 -0
  60. data/lib/nexmo/oas/renderer/views/open_api/_request_single.erb +53 -0
  61. data/lib/nexmo/oas/renderer/views/open_api/_requests.erb +22 -0
  62. data/lib/nexmo/oas/renderer/views/open_api/_response_description_parameters.erb +88 -90
  63. data/lib/nexmo/oas/renderer/views/open_api/_response_descriptions.erb +32 -12
  64. data/lib/nexmo/oas/renderer/views/open_api/_response_fields.erb +1 -16
  65. data/lib/nexmo/oas/renderer/views/open_api/_response_tabs.erb +2 -2
  66. data/lib/nexmo/oas/renderer/views/open_api/_responses.erb +51 -0
  67. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_parameters.erb +15 -4
  68. data/lib/nexmo/oas/renderer/views/open_api/_tabbed_single_parameter.erb +56 -0
  69. data/lib/nexmo/oas/renderer/views/open_api/_webhooks.erb +30 -0
  70. data/lib/nexmo/oas/renderer/views/open_api/show.erb +10 -115
  71. data/nexmo-oas-renderer.gemspec +26 -26
  72. metadata +60 -49
  73. data/lib/nexmo/oas/renderer/public/assets/javascripts/components/scroll.js +0 -21
  74. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/core.scss +0 -137
  75. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/navigation.scss +0 -102
  76. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/nexmo.scss +0 -61
  77. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/syntax.scss +0 -63
  78. data/lib/nexmo/oas/renderer/public/assets/stylesheets/sass/typography.scss +0 -248
  79. 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
- }