skyward-api 0.4.1 → 0.4.2
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 +4 -4
- data/README.md +16 -5
- data/lib/skyward/api/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e5a0e072cba6a07e03af1c808d262b1f7e0504dfdf668e964a7ee0c099b0cfe
|
|
4
|
+
data.tar.gz: 4083278647b6867d679a01850620f57cd961f7964879d0b46c116baafd5aa2fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 246168aa8fbf395da47db0ad559eb01fa8dc70b993dfc5c3b95769ffa09fa0e5d313f3539d5789cfa2e8cd1cbbe2996e2bb594faa98b0e71e28577f7f87cdcea
|
|
7
|
+
data.tar.gz: f4df10aff7227e886f5e82dadbbfeaed1d8d35fb9f3f8e22f1194cf8d0307229deebe849b00efdd238fe12f64e7aa11cae9a32e160fe25b5d88076b95af7977a
|
data/README.md
CHANGED
|
@@ -314,7 +314,9 @@ Mixing typed and untyped is fine. An endpoint without a signature behaves exactl
|
|
|
314
314
|
## OpenAPI docs
|
|
315
315
|
|
|
316
316
|
```ruby
|
|
317
|
-
Skyward.app(docs: true)
|
|
317
|
+
Skyward.app(docs: true) do |app|
|
|
318
|
+
# mount the app's APIs here
|
|
319
|
+
end
|
|
318
320
|
```
|
|
319
321
|
|
|
320
322
|
| Path | Serves |
|
|
@@ -340,7 +342,9 @@ App = Skyward.app(
|
|
|
340
342
|
title: 'Best Todos Ever',
|
|
341
343
|
version: '1.0.0',
|
|
342
344
|
description: 'Lists of things to do, and the todos on them.'
|
|
343
|
-
)
|
|
345
|
+
) do |app|
|
|
346
|
+
# mount the app's APIs here
|
|
347
|
+
end
|
|
344
348
|
|
|
345
349
|
class TodosAPI < Skyward::API
|
|
346
350
|
description 'Things to do, and the satisfaction of ticking them off.'
|
|
@@ -351,8 +355,13 @@ class TodosAPI < Skyward::API
|
|
|
351
355
|
response is the same.
|
|
352
356
|
TEXT
|
|
353
357
|
|
|
354
|
-
def index(done: nil, limit: 50)
|
|
355
|
-
|
|
358
|
+
def index(done: nil, limit: 50)
|
|
359
|
+
# list the todos
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
def complete(id:)
|
|
363
|
+
# mark the todo as done
|
|
364
|
+
end
|
|
356
365
|
end
|
|
357
366
|
```
|
|
358
367
|
|
|
@@ -385,7 +394,9 @@ A client generated from the document takes its names from it, so every name is o
|
|
|
385
394
|
To name a schema yourself, pass `schema_names:`. It needs no change to the class, so it works for Skyward ORM records and other gems' classes too:
|
|
386
395
|
|
|
387
396
|
```ruby
|
|
388
|
-
Skyward.app(docs: true, schema_names: { Statuses::Record => 'Status' })
|
|
397
|
+
Skyward.app(docs: true, schema_names: { Statuses::Record => 'Status' }) do |app|
|
|
398
|
+
# mount the app's APIs here
|
|
399
|
+
end
|
|
389
400
|
```
|
|
390
401
|
|
|
391
402
|
A schema name has only letters, digits, `.`, `-` and `_`, as OpenAPI requires, and no two schemas share one, including `Problem`. Skyward API refuses to boot otherwise.
|
data/lib/skyward/api/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: skyward-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jake Bottrall
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 0.4.
|
|
18
|
+
version: 0.4.2
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 0.4.
|
|
25
|
+
version: 0.4.2
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: bigdecimal
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|