Slide 1

Slide 1 text

Copyright 2018 Studyplus, Inc. All Rights Reserved. ٕज़બఆͰࣦഊ͓ͨ͠͸ͳ͠ Akifumi Tomiyama / Studyplus Inc. 2019.4.4 @දࢀಓ.rb#45

Slide 2

Slide 2 text

ࣗݾ঺հ ෌ࢁথ࢙ Akifumi Tomiyama atomiyama atomiyama_1216 2017.9 Rubyडୗ։ൃ 2018.9 ελσΟϓϥεגࣜձࣾ
 For Schoolࣄۀ෦
 αʔόʔαΠυΤϯδχΞ ✎ Ruby, Railsྺ 2೥

Slide 3

Slide 3 text

4UVEZQMVTGPS4DIPPM͸ɺڭҭػؔ޲ֶ͚श؅ཧαʔϏεͰ͢ɻ ੜెͷ೔ʑͷ౒ྗΛɺؾ͖ͮɺ๙ΊΔػೳΛଟ਺ἧ͍͑ͯ·͢ɻ 4/4ͷΑ͏ͳૢ࡞ײͰɺ୭Ͱ΋͙͢ʹ࢖͍͸͡ΊΒΕ·͢ɻ ઌੜ͕ੜెΛ๙ΊΔػձΛ࠷େԽ͢Δɺֶशक़ͷ৽͍͠ελϯμʔυ

Slide 4

Slide 4 text

APIͷυΩϡϝϯςʔγϣϯͲ͏ͯ͠·͔͢ʁ

Slide 5

Slide 5 text

swagger2.0Ͱࣦഊͨ͠࿩

Slide 6

Slide 6 text

ࠓ೔ͷ͓࿩ ✎ αʔϏεͷϦχϡʔΞϧͰϑϩϯτΛಠཱͤ͞Δͱ͖ RailsͷAPIαʔόʔԽ ✎ υΩϡϝϯςʔγϣϯʹswagger2.0Λಋೖ͠swagger wayΛ֎ΕͯڧҾʹߦͬͨΒਏ͞ΛੜΜͩ࿩

Slide 7

Slide 7 text

എܠ Monolithic Rails App SoE
 (Client App) SoR
 (Rails API) ✎ SPAʹͯ͠ը໘ભҠΛૣ͍ͨ͘͠ ✎ σβΠφʔ͕ೖͬͨͷͰUIͷ࡮৽ ✎ Ϟμϯͳٕज़Ͱ͔ͬ͜Α͍ͨ͘͠

Slide 8

Slide 8 text

2018/10ࠒ ✎ swagger2.0 ✎ swagger-blocks ✎ swagger_ui_engine ✎ apivore ࠓ ✎ OpenAPI3.0 ✎ swagger-editor ✎ json_refs ✎ committeeʢ3.0ରԠ͋Γ͕ͱ͏ʣ

Slide 9

Slide 9 text

swaggerΛॻ͍͓ͯ͘ͱخ͍͜͠ͱ ✎ ϞοΫαʔόʔͭ͘Δͷ؆୯ ✎ ΫϥΠΞϯτ։ൃऀͱͷ஗ԆΛ࠷খԽͰ͖Δ ✎ υΩϡϝϯτͱ࣮૷ͷണ཭ʹؾ͚ͮΔ ✎ ςετָ͕͘͢͝ʹͳΔ

Slide 10

Slide 10 text

swagger2.0ʹͨ͠ཧ༝ ✎ swagger2.0पΓͷgem͕๛෋ͩͬͨ ✎ ౰࣌openapi3.0ʹରԠͨ͠ςετπʔϧ͕ͳ͔ͬͨ ✎ controllerͷதʹDSLͰॻ͘ܗ͕Πέ͍ͯΔͱࢥͬͯͨ ✎ ωοτ্Ͱͷ৘ใ͸2.0ͷ΄͏͕ଟ͔ͬͨ

Slide 11

Slide 11 text

໰୊ ✎ ܕ͕Ұ͔ͭ͠ఆٛͰ͖ͳ͍ ✎ formDataͰෳ਺ϑΝΠϧΞοϓϩʔυΛදݱͰ͖ͳ͍ ࣗલͰnullΛ֦ு͢ΔͳͲ…

Slide 12

Slide 12 text

#

Slide 13

Slide 13 text

✎ swagger-uiͰεΩʔϚ͕දݱ͞Ε͍ͯͳ͍ ✎ ϥΠϒϥϦ͕֦ு͞ΕͨεΩʔϚΛೝࣝͰ͖ͳͯ͘ਖ਼ ͘͠ςετ͞Εͳ͍ ແཧʹίʔυͰղܾ͠Α͏ͱͨ͠Β

Slide 14

Slide 14 text

υΩϡϝϯτͱ࣮૷ʹဃ཭͕…

Slide 15

Slide 15 text

OpenAPI3.0ͳΒͰ͖ͨͷʹ…

Slide 16

Slide 16 text

໰୊ ✎ ܕ͕Ұ͔ͭ͠ఆٛͰ͖ͳ͍ ✎ ෳ਺ϑΝΠϧͷ഑ྻΛදݱͰ͖ͳ͍ ✎ nullable ✎ requestBody ղܾ

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

͖ͬ͢Γ

Slide 19

Slide 19 text

υΩϡϝϯτͱ࣮૷ͷဃ཭͕๷͛Δ

Slide 20

Slide 20 text

ΈΜͳ͋͠Θͤ$

Slide 21

Slide 21 text

ڭ܇ ✎ ٕज़બఆ͸৻ॏʹߦ͍·͠ΐ͏ ✎ ࢓༷͕ϥΠϒϥϦ,ϑϨʔϜϫʔΫ͔Β͸Έग़ͯ͠͠· ͏Α͏ͳ࣌ίʔυϨϕϧͰղܾ͢Δͷ͸ྑ͘ͳ͍ ✎ ຊ౰ʹͦͷٕज़Ͱߦͬͯେৎ෉ͳͷ͔νʔϜͰٞ࿦Λ͠ ͳ͓͢͜ͱ͕େࣄ

Slide 22

Slide 22 text

Ҏલ՝୊͸͍ͬͺ͍͋Δ͚Ͳ ✎ AMSͱswaggerͷ෼཭ ✎ ymlϑΝΠϧͷ؅ཧ ✎ υΩϡϝϯτߋ৽͔Βެ։ɼ։ൃϑϩʔ

Slide 23

Slide 23 text

ͱΓ͋͑ͣ͠͹Β͘΍͍͚ͬͯͦ͏$

Slide 24

Slide 24 text

We’re Hiring! ΤϯδχΞืूத https://info.studyplus.co.jp/recruit

Slide 25

Slide 25 text

͝੩ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠