model_driven_api 2.4.2 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ebbf8c8f9cb0482195ef574b6bab41ec475f902adbf03de770919d2ac0fbd40
4
- data.tar.gz: cc1a6d816f3d2a448a80dc91bdd4aab17d83aa303333241a8a401ca4b4b0dcd3
3
+ metadata.gz: 2f587fb3dc87ca59c5a9cfa3bd03137481b64bb691d69324b956a68f43316018
4
+ data.tar.gz: 92ad2b21cd10fceab0c7b0d5439048a9d01fdfa8f8d8c64046c1e451279666d2
5
5
  SHA512:
6
- metadata.gz: '01395a025a0443d82d5e8642b5a83677d4baa85fc09139f90f333c8673a95060afce395adca76e7d0f515f32749d728fa3d5be67c75fb56807b62eeb063ab515'
7
- data.tar.gz: 9ec3c4dfed6b399e633cbf8adb208296093057fac04a5e7754c7b5947102e8d14b14c3582c536ecba8f1fa35791400ab4e902991bd5790ce69f4005609847495
6
+ metadata.gz: 74e867b8007e9d8234321cb569e4e2d5505dc2347ba563a9e71dfc1e8a7ff30a3eea4264c6e79c51a5b3e74d8a70b1b220064530c6dfa9962dc05fba57066440
7
+ data.tar.gz: 8bcf5ae78e32f788fd62ec66df1b3d46614b47b74c59e0a9d05f72d9efa8cf8fbc2996f67f23a9d1428e700203d54ae1a1af12957c051e49f3378bda7e5e7733
data/README.md CHANGED
@@ -140,6 +140,14 @@ Once the JWT has been retrieved, the **Authenticated Request**s must use it in a
140
140
 
141
141
  ```
142
142
  Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJleHAiOjE1OTA3NzQyMzR9.Z-1yECp55VD560UcB7gIhgVWJNjn8HUerG5s4TVSRko
143
+ ```
144
+
145
+ #### Token Refresh
146
+
147
+ If issued during the token validity period, this will just return a new JWT to be used during following API request.
148
+
149
+ ```bash
150
+ :GET http://localhost:3000/api/v2/info/heartbeat
143
151
  ```
144
152
 
145
153
  ### CRUD Actions
@@ -299,7 +307,7 @@ Something like this can be retrieved:
299
307
  By issuing this GET request:
300
308
 
301
309
  ```bash
302
- GET http://localhost:3000/api/v2/info/roles
310
+ GET http://localhost:3000/api/v2/info/schema
303
311
  ```
304
312
 
305
313
  You will get something like:
@@ -73,4 +73,9 @@ class Api::V2::InfoController < Api::V2::ApplicationController
73
73
  end
74
74
  render json: pivot.to_json, status: 200
75
75
  end
76
+
77
+ def settings
78
+ render json: ThecoreSettings::Setting.pluck(:ns, :key, :raw).inject({}){|result, array| (result[array.first] ||= {})[array.second] = array.third; result }.to_json, status: 200
79
+ end
80
+
76
81
  end
data/config/routes.rb CHANGED
@@ -13,6 +13,7 @@ Rails.application.routes.draw do
13
13
  get :schema
14
14
  get :dsl
15
15
  get :heartbeat
16
+ get :settings
16
17
  end
17
18
 
18
19
  post "authenticate" => "authentication#authenticate"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_driven_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-07 00:00:00.000000000 Z
11
+ date: 2022-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_backend_commons