schemaless_rest_api 0.3.4 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/schemaless_rest_api/rest_server.rb +37 -51
- data/lib/schemaless_rest_api/server_utils.rb +22 -0
- data/lib/schemaless_rest_api/swagger/index.css +16 -0
- data/lib/schemaless_rest_api/swagger/swagger-initializer.js +19 -0
- data/lib/schemaless_rest_api/swagger/swagger-ui-bundle.js +2 -0
- data/lib/schemaless_rest_api/swagger/swagger-ui-bundle.js.map +1 -0
- data/lib/schemaless_rest_api/swagger/swagger-ui-standalone-preset.js +2 -0
- data/lib/schemaless_rest_api/swagger/swagger-ui-standalone-preset.js.map +1 -0
- data/lib/schemaless_rest_api/swagger/swagger-ui.css +3 -0
- data/lib/schemaless_rest_api/swagger/swagger.html +19 -0
- data/lib/schemaless_rest_api/swagger/swagger.json +3 -0
- data/lib/schemaless_rest_api/swagger_builder.rb +166 -0
- data/lib/schemaless_rest_api/version.rb +1 -1
- data/lib/schemaless_rest_api.rb +13 -2
- metadata +18 -7
data/lib/schemaless_rest_api.rb
CHANGED
@@ -4,18 +4,29 @@
|
|
4
4
|
|
5
5
|
require_relative "schemaless_rest_api/version"
|
6
6
|
require_relative "schemaless_rest_api/entities"
|
7
|
+
require_relative "schemaless_rest_api/swagger_builder"
|
7
8
|
require "tapioca"
|
8
9
|
require "logger"
|
9
|
-
|
10
|
+
require "ougai"
|
10
11
|
require "json"
|
11
12
|
require "securerandom"
|
12
13
|
|
13
14
|
# Global params for Schemalass REST API
|
14
15
|
module SchemalessRestApi
|
15
|
-
|
16
|
+
if ENV["Log"] == 'structured'
|
17
|
+
@logger = Ougai::Logger.new($stdout)
|
18
|
+
@log_type = :ougai
|
19
|
+
else
|
20
|
+
@logger = Logger.new($stdout)
|
21
|
+
@log_type = :basic
|
22
|
+
end
|
23
|
+
|
16
24
|
class << self
|
17
25
|
# @return Logger
|
18
26
|
attr_accessor :logger
|
27
|
+
|
28
|
+
# @return Logger type
|
29
|
+
attr_accessor :log_type
|
19
30
|
end
|
20
31
|
|
21
32
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schemaless_rest_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Garratt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongo
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: ougai
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: puma
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rackup
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: route_downcaser
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,7 +81,7 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: sinatra
|
84
|
+
name: sinatra
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
@@ -123,6 +123,17 @@ files:
|
|
123
123
|
- lib/schemaless_rest_api/entities.rb
|
124
124
|
- lib/schemaless_rest_api/mongo_client.rb
|
125
125
|
- lib/schemaless_rest_api/rest_server.rb
|
126
|
+
- lib/schemaless_rest_api/server_utils.rb
|
127
|
+
- lib/schemaless_rest_api/swagger/index.css
|
128
|
+
- lib/schemaless_rest_api/swagger/swagger-initializer.js
|
129
|
+
- lib/schemaless_rest_api/swagger/swagger-ui-bundle.js
|
130
|
+
- lib/schemaless_rest_api/swagger/swagger-ui-bundle.js.map
|
131
|
+
- lib/schemaless_rest_api/swagger/swagger-ui-standalone-preset.js
|
132
|
+
- lib/schemaless_rest_api/swagger/swagger-ui-standalone-preset.js.map
|
133
|
+
- lib/schemaless_rest_api/swagger/swagger-ui.css
|
134
|
+
- lib/schemaless_rest_api/swagger/swagger.html
|
135
|
+
- lib/schemaless_rest_api/swagger/swagger.json
|
136
|
+
- lib/schemaless_rest_api/swagger_builder.rb
|
126
137
|
- lib/schemaless_rest_api/version.rb
|
127
138
|
homepage: https://gitlab.com/samuel-garratt/schemaless_rest_api
|
128
139
|
licenses:
|