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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -5
  3. data/lib/skyward/api/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae83d4087ae6b30e2f71d46ccbe2411aa9b0eda9fb9e808668729ccd26285dc6
4
- data.tar.gz: b0931995b0908395f024d9aafcfe52c361c722cc37c92374c76ed697a9f9108c
3
+ metadata.gz: 4e5a0e072cba6a07e03af1c808d262b1f7e0504dfdf668e964a7ee0c099b0cfe
4
+ data.tar.gz: 4083278647b6867d679a01850620f57cd961f7964879d0b46c116baafd5aa2fc
5
5
  SHA512:
6
- metadata.gz: c0a5328e129791a84710b9a4a9e2a47194199af046e6a11d61252720cc6152fb6b59487a9472cc75897d3a222255994bf3cc7c333c90128a5dab56a31b2a176b
7
- data.tar.gz: 98185ca66483e2f962be0c23750e2b6141d510a732234104cde6bb778a7671d5a301b31d66a71dd2099eb7d79cc5ce6ca7949dc90a43cc82cd1bf2c92926d531
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
- def complete(id:) = ...
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.
@@ -4,7 +4,7 @@ module Skyward
4
4
  class API
5
5
  # x-release-please-start-version
6
6
 
7
- VERSION = '0.4.1' #: String
7
+ VERSION = '0.4.2' #: String
8
8
 
9
9
  # x-release-please-end
10
10
  end
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.1
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.1
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.1
25
+ version: 0.4.2
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bigdecimal
28
28
  requirement: !ruby/object:Gem::Requirement