Upgrade to Pro — share decks privately, control downloads, hide ads and more …

平静を保ち、コードを生成せよ 〜 OpenAPI Generator誕生の背景と軌跡 〜 / gunmaweb34

平静を保ち、コードを生成せよ 〜 OpenAPI Generator誕生の背景と軌跡 〜 / gunmaweb34

Gunma.web #34 スキーマ駆動開発で発表した資料です!
https://gunmaweb.connpass.com/event/113974/

(追記)
OpenAPI Generatorの電子書籍をリリースしましたのでぜひチェックしてください!

REST API のためのコード生成入門 (OpenAPI Generator)
https://gumroad.com/l/openapi_generator_ebook_jp
(/追記)

発表時から下記修正を加えました。
* サブタイトルをつけ忘れていたのを修正しました
* 一部の画面キャプチャを非表示にしました (非表示にした理由はスライドに記載しています)

Akihito Nakano

February 02, 2019
Tweet

More Decks by Akihito Nakano

Other Decks in Programming

Transcript

  1. ʙ0QFO"1*(FOFSBUPS஀ੜͷഎܠͱي੻ʙ
    த໺ڿਓΞεΫϧגࣜձࣾ
    (VONBXFCεΩʔϚۦಈ։ൃ
    ฏ੩ΛอͪɺίʔυΛੜ੒ͤΑ

    View full-size slide

  2. 8FCΞϓϦέʔγϣϯΤϯδχΞ
    த໺ڿਓ!/","/0@"LJIJUP
    ܈അݝ༢ָ܊༢ָொग़਎
    IUUQTBDLJOUPTIHJUIVCJPBCPVU

    View full-size slide

  3. ܈അݝ༢ָ܊༢ָொग़਎
    IUUQTXXXUPXOPSBHVONBKQ

    View full-size slide

  4. 044׆ಈ
    w0QFO"1*(FOFSBUPS
    wIUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPS
    w(BOFTIB Ψωʔγϟ

    wIUUQTHJUIVCDPNBDLJOUPTIHBOFTIB
    w4OJEFM εφΠσϧ

    wIUUQTHJUIVCDPNBDLJOUPTITOJEFM

    View full-size slide

  5. 8%#13&447PM
    ಛू
    <ޮ཰ٸ্ঢ>εΩʔϚۦಈ8FC"1*։ൃ
    ষޙ൒ʙষΛࣥච͍͖ͤͯͨͩ͞·͠
    ͨ!ײँ

    View full-size slide

  6. Gunma.web #34
    εΩʔϚۦಈ։ൃ

    View full-size slide

  7. ໨࣍
    wεΩʔϚۦಈ։ൃ
    w lεΩʔϚۦಈ։ൃzͷىݯɺಛ௃
    w0QFO"1*
    w 0QFO"1*஀ੜͷྺ࢙ɺه๏ɺ4XBHHFS5PPMT
    w0QFO"1*(FOFSBUPS
    w ஀ੜͷഎܠɺجຊૢ࡞
    w ΧελϚΠζํ๏ɺΞϯνύλʔϯ
    εΩʔϚۦಈ։ൃ΍0QFO"1*
    ʹ͍ͭͯ֓؍ͨ͋͠ͱɺ
    ࢲͷಘҙ෼໺Ͱ͋Δ
    ίʔυੜ੒ʹ͍ͭͯ۷ΓԼ͛
    ͓ͯ࿩͍͖ͯ͠·͢

    View full-size slide

  8. εΩʔϚۦಈ։ൃ

    View full-size slide

  9. εΩʔϚۦಈ։ൃͱ͸
    w໌֬ͳఆ͕ٛ͋ΔΘ͚Ͱ͸ͳ͍
    w8%#13&44ͷಛूͰ͸POL͞ΜͷԼهͷϒϩάண૝Λಘͯ

    zεΩʔϚۦಈ։ൃzͱ͍͏λΠτϧΛ͚ͭͨ
    wεΩʔϚϑΝʔετ։ൃͷεεϝ
    wIUUQTCMPHPOLOJOKBTDIFNB@pSTU@EFWFMPQNFOU

    View full-size slide

  10. εΩʔϚۦಈ։ൃͱ͸։ൃͷྲྀΕͷҧ͍
    Ҿ༻IUUQTCMPHPOLOJOKBTDIFNB@pSTU@EFWFMPQNFOU
    API هड़ݴޠҎલͷੈք:
    API هड़ݴޠҎޙͷੈք:

    View full-size slide

  11. εΩʔϚۦಈ։ൃͱ͸։ൃͷྲྀΕͷҧ͍
    API هड़ݴޠҎલͷੈք:
    API هड़ݴޠҎޙͷੈք:
    Ҿ༻IUUQTCMPHPOLOJOKBTDIFNB@pSTU@EFWFMPQNFOU

    View full-size slide

  12. εΩʔϚۦಈ։ൃͱ͸εΩʔϚͱ͸
    wԿ͔͠Βͷߏ଄Λఆٛͯ͠ɺ͋ΔఆΊΒΕͨܗࣜͰهड़ͨ͠΋ͷ
    wྫσʔλϕʔεεΩʔϚ%%-
    w8FC"1*Ͱ͍͏ͱʜ
    wͲͷΤϯυϙΠϯτ͕
    wͲΜͳϦΫΤετΛड෇͚Δͷ͔
    wͲΜͳϨεϙϯεΛฦ͢ͷ͔

    View full-size slide

  13. εΩʔϚۦಈ։ൃͱ͸ͭ·Γ
    w͸͡ΊʹΈΜͳͰ૬ஊ͠ͳ͕ΒεΩʔϚΛܾΊͯɺ
    wͦΕΛ΋ͱʹฒߦͯ͠։ൃ͢Δ͜ͱ
    ։ൃνʔϜશମͷϫʔΫϑϩʔ
    Ͱ͋Δɻ
    ͭ·Γ

    View full-size slide

  14. εΩʔϚۦಈ։ൃ৽͍͠։ൃख๏ͱ͍͏Θ͚Ͱ͸ͳ͍
    wίϯτϥΫτϑΝʔετ
    wσβΠϯϑΝʔετ
    Ͱ͸εΩʔϚۦಈ։ൃΛಛ௃͚ͮΔ΋ͷͱ͸ʜ
    ʢಉ͡ࢥ૝ͷ։ൃϑϩʔʣ
    εΩʔϚͰ։ൃΛۦಈ͢Δ͜ͱ
    8FC"1*ͷ࢓༷Λهड़͠
    ֤छπʔϧΛ׆༻ͯ͠։ൃΛޮ཰Խ͢Δ͜ͱ

    View full-size slide

  15. 8%#13&447PM
    8%#13&447PMͷಛूͰ͸ɺ
    εΩʔϚۦಈ։ൃͷελΠϧ͕ొ৔͢Δ
    લ͔Βͷ։ൃख๏ͷભҠΛஈ֊తʹ͝঺
    հ͍ͯ͠·͢ɻ
    εΩʔϚͰۦಈ͢Δ։ൃͷྑ͞΍ɺͦͷ
    ඞཁੑΛΑΓਂ͘஌Δ͜ͱ͕Ͱ͖·͢
    IUUQTHJIZPKQNBHB[JOFXEQSFTTBSDIJWFWPM

    View full-size slide

  16. εΩʔϚۦಈ։ൃͱ͸εΩʔϚͱ͸ ࠶

    wԿ͔͠Βͷߏ଄Λఆٛͯ͠ɺ͋ΔఆΊΒΕͨܗࣜͰهड़ͨ͠΋ͷ
    wྫσʔλϕʔεεΩʔϚ
    w8FC"1*Ͱ͍͏ͱʜ
    wͲͷΤϯυϙΠϯτ͕
    wͲΜͳϦΫΤετΛड෇͚Δͷ͔
    wͲΜͳϨεϙϯεΛฦ͢ͷ͔

    View full-size slide

  17. εΩʔϚۦಈ։ൃεΩʔϚΛهड़͢ΔϑΥʔϚοτ
    w0QFO"1*TQFDJpDBUJPO چ4XBHHFSTQFDJpDBUJPO

    w"1*#MVFQSJOU
    w3".-
    8FC"1* 3&45"1*
    ͷεΩʔϚΛهड़͢ΔϑΥʔϚοτ

    View full-size slide

  18. 0QFO"1*֓ཁ
    IUUQTHJUIVCDPN0"*0QFO"1*4QFDJpDBUJPO
    The OpenAPI Specification
    w0QFO"1* 0QFO"1*TQFDJpDBUJPO

    wچ4XBHHFSTQFDJpDBUJPO
    w3&45"1*ͷ࢓༷Λهड़͢ΔϑΥʔϚοτ
    w0QFO"1**OJUJBUJWF
    w0QFO"1*ͷϑΥʔϚοτΛਪਐ͢Δஂମ
    w.JDSPTPGUɺ(PPHMFɺ*#.ɺ4NBSU#FBSͳͲ͕
    ࢀՃ

    View full-size slide

  19. w೥݄0QFO"1**OJUJBUJWF݁੒
    w೥݄4XBHHFSTQFDJpDBUJPO͕0QFO"1**OJUJBUJWFʹدଃ͞ΕΔ
    w4XBHHFSTQFDJpDBUJPO͕0QFO"1*TQFDJpDBUJPOʹϦωʔϜ͞
    ΕΔ
    w೥݄0QFO"1*TQFDJpDBUJPOϦϦʔε
    w೥݄ݱࡏͷόʔδϣϯ͸0QFO"1*TQFDJpDBUJPO
    0QFO"1*ྺ࢙
    4XBHHFSϓϩδΣΫτ 0QFO"1**OJUJBUJWF
    0QFO"1*TQFD
    4XBHHFSTQFD
    4XBHHFSUPPMT

    View full-size slide

  20. 0QFO"1*༻ޠʹ͍ͭͯͷ஫ҙࣄ߲
    w0QFO"1*ͷϑΥʔϚοτͷ໊শ͸ɺݫີʹ͸l0QFO"1*4QFDJpDBUJPOz
    w௕͍ͷͰ0QFO"1*Ͱݺ͹ΕΔɻ0"4ͱུ͢͜ͱ΋͋Δ
    w0QFO"1*ͷੈքͰ͸ɺ0QFO"1*Ͱॻ͔Εͨ΋ͷΛz0QFO"1*υΩϡϝϯτzͱ
    ݺͿ
    w IUUQTHJUIVCDPN0"*0QFO"1*4QFDJpDBUJPOCMPCNBTUFSWFSTJPOTNEPQFOBQJEPDVNFOU
    w"1*ͷߏ଄Λఆٛ͢ΔʮεΩʔϚʯͱɺʮ0QFO"1*υΩϡϝϯτʯ͸ಉ͡
    ΋ͷΛࢦ͢

    View full-size slide

  21. 8%#13&447PM
    εΩʔϚۦಈ։ൃ͸։ൃશମͷϫʔΫϑ
    ϩʔͰ͢ͷͰɺ4XBHHFS0QFO"1*΍
    3&45ͱ͍ͬͨಛఆͷπʔϧ܈΍ύϥμΠ
    Ϝʹݶͬͨ΋ͷͰ͸͋Γ·ͤΜɻ
    ಛूͰ͸ɺ(SBQI2-ʹΑΔεΩʔϚۦಈ
    ։ൃ΋঺հ͍ͯ͠·͢
    IUUQTHJIZPKQNBHB[JOFXEQSFTTBSDIJWFWPM

    View full-size slide

  22. 0QFO"1*ϑΥʔϚοτ
    IUUQTCMPHSFBENFJPBOFYBNQMFpMMFEHVJEFUPTXBHHFS

    View full-size slide

  23. 0QFO"1*ϑΥʔϚοτ ϝλ৘ใ

    IUUQTCMPHSFBENFJPBOFYBNQMFpMMFEHVJEFUPTXBHHFS

    View full-size slide

  24. 0QFO"1*ϑΥʔϚοτ ΤϯυϙΠϯτ

    IUUQTCMPHSFBENFJPBOFYBNQMFpMMFEHVJEFUPTXBHHFS

    View full-size slide

  25. 0QFO"1*ϑΥʔϚοτ ίϯϙʔωϯτ

    IUUQTCMPHSFBENFJPBOFYBNQMFpMMFEHVJEFUPTXBHHFS

    View full-size slide

  26. 8%#13&447PM
    8%#13&447PMͷಛूͰ͸ɺ
    0QFO"1*υΩϡϝϯτΛߏ੒͢Δ༷ʑͳ
    ΦϒδΣΫτΛৄࡉʹղઆ͍ͯ͠·͢ɻ
    ۩ମతͳه๏ɾ஫ҙ఺΍هड़ͨ͠
    0QFO"1*υΩϡϝϯτͷ؅ཧํ๏ͳͲΛ
    ஌Δ͜ͱ͕Ͱ͖·͢
    IUUQTHJIZPKQNBHB[JOFXEQSFTTBSDIJWFWPM

    View full-size slide

  27. εΩʔϚۦಈ։ൃͱ͸ ࠶

    w͸͡ΊʹΈΜͳͰ૬ஊ͠ͳ͕ΒεΩʔϚΛܾΊͯɺ
    wͦΕΛ΋ͱʹฒߦͯ͠։ൃ͢Δ͜ͱ
    ։ൃνʔϜશମͷϫʔΫϑϩʔ
    Ͱ͋Δɻ
    ͭ·Γ
    πʔϧͷࢧԉ͕ඞཁ

    View full-size slide

  28. Swagger Tools

    View full-size slide

  29. 0QFO"1*4XBHHFS5PPMT
    w4XBHHFS&EJUPS
    w0QFO"1*υΩϡϝϯτ εΩʔϚ
    ͷهड़Λࢧԉ
    wIUUQTFEJUPSTXBHHFSJP
    w4XBHHFS6*
    w"1*࢓༷Λࢹ֮ԽɺΠϯλϥΫςΟϒͳ"1*ૢ࡞
    wIUUQTQFUTUPSFTXBHHFSJP
    w4XBHHFS$PEFHFO
    w0QFO"1*υΩϡϝϯτ͔ΒιʔείʔυΛࣗಈੜ੒

    View full-size slide

  30. 0QFO"1*εΩʔϚۦಈ։ൃͱ4XBHHFS5PPMT
    IUUQTCMPHPOLOJOKBTDIFNB@pSTU@EFWFMPQNFOU
    API هड़ݴޠҎޙͷੈք
    0QFO"1*υΩϡϝϯτͷهड़
    ࢓༷ͷڞ༗ɾ֬ೝ
    ελϒੜ੒ػೳΛར༻ͨ͠εΩϟϑΥʔϧσΟϯά
    ੜ੒ͨ͠ελϒΛར༻ͨ͠ฏߦ։ൃ
    ੜ੒ͨ͠ΫϥΠΞϯτΛར༻ͨ͠޻਺࡟ݮ
    ςετίʔυͷࣗಈੜ੒
    Swagger Editor
    Swagger UI
    Swagger Codegen

    View full-size slide

  31. 0QFO"1*υΩϡϝϯτͷهड़
    ࢓༷ͷڞ༗ɾ֬ೝ
    Swagger Editor
    Swagger UI
    0QFO"1*ίʔυੜ੒ͷԸܙ͸େ͖͍
    IUUQTCMPHPOLOJOKBTDIFNB@pSTU@EFWFMPQNFOU
    API هड़ݴޠҎޙͷੈք
    ελϒੜ੒ػೳΛར༻ͨ͠εΩϟϑΥʔϧσΟϯά
    ੜ੒ͨ͠ελϒΛར༻ͨ͠ฏߦ։ൃ
    ੜ੒ͨ͠ΫϥΠΞϯτΛར༻ͨ͠޻਺࡟ݮ
    ςετίʔυͷࣗಈੜ੒
    Swagger Codegen

    View full-size slide

  32. OpenAPI Generator

    View full-size slide

  33. 0QFO"1*(FOFSBUPS֓ཁ
    w೥݄ʹ஀ੜ
    w4XBHHFS$PEFHFOW͔ΒϑΥʔΫ
    wαϙʔτ͢ΔݴޠɾϑϨʔϜϫʔΫ͸Ҏ্
    w0QFO"1*ʹରԠ
    w0QFO"1**OJUJBUJWFͱ͸ؔ܎ͳ͍
    w 0"*഑ԼͷϓϩδΣΫτͩͱؒҧΘΕΔ͜ͱ͕͋Δ

    IUUQTPQFOBQJHFOFSBUPSUFDI

    View full-size slide

  34. OpenAPI Generator
    ϑΥʔΫͷഎܠͱ͜Ε·Ͱͷي੻

    View full-size slide

  35. 0QFO"1*(FOFSBUPSϑΥʔΫͷഎܠ 4NBSU#FBSࣾͷίϛϡχςΟܰࢹ

    w4XBHHFS$PEFHFOͷ։ൃ͸4NBSU#FBS͕ࣾओಋ͍ͯ͠Δ
    w೥ʹ4XBHHFSϓϩδΣΫτͷεϙϯαʔγοϓΛ4NBSU#FBS͕ࣾҾ
    ͖ܧ͍ͩ
    w IUUQTRJJUBDPNSJOBYTVNPNPJUFNTCFFFBFFEDG
    w೥݄ʹ0QFO"1*͕ϦϦʔε͞Εɺ֤044ϓϩδΣΫτ΍༗ঈαʔ
    Ϗε͸ͦͷରԠʹணख
    w͔͠͠ɺ4XBHHFS$PEFHFO͸೥ॳΊʹͳͬͯ΋ରԠ͕ਐΜͰ͓Βͣڝ
    ߹͔Β஗ΕΛͱ͍ͬͯͨ
    wʹ΋ؔΘΒͣ4NBSU#FBSࣾ͸0QFO"1*ରԠͱ͸ؔ܎ແ͍େ͖ͳվमΛlಠ
    அͰzߦ͏

    View full-size slide

  36. wϦϙδτϦͷ෼ׂ
    0QFO"1*(FOFSBUPSϑΥʔΫͷഎܠ ಠஅͰߦΘΕͨେ͖ͳվम

    TXBHHFSDPEFHFO
    TXBHHFSDPEFHFOHFOFSBUPST

    View full-size slide

  37. 0QFO"1*(FOFSBUPSϑΥʔΫͷഎܠ ίϛϡχςΟʹ޿͕Δෆ৴ײ

    wಠஅͰਐΜͰ͍͘։ൃํ਑ʹ͍ͭͯɺίϛϡχςΟ͔Β੠্͕͕Δ͕ɺฉ͖ೖ
    ΕΒΕͳ͍
    ൃද࣌͸ɺ౰࣌ͷঢ়گΛΑΓϦΞϧʹ఻͑ΔͨΊʹJTTVFͳͲͷ
    ը໘ΩϟϓνϟΛ͜͜ʹೖΕ͍ͯ·͕ͨ͠ɺ
    ಛఆͷݸਓ΁ͷ൷൑ʹܨ͕Γ͔Ͷͳ͍ͨΊɺެ։͢ΔεϥΠυͰ͸߇͍͖͑ͤͯͨͩ͞·͢

    View full-size slide

  38. wϨϏϡʔΛ௨ͣ͞ʹςετίʔυΛҰؾʹແޮԽ
    0QFO"1*(FOFSBUPSϑΥʔΫͷഎܠ ίϛϡχςΟʹ޿͕Δෆ৴ײ

    ൃද࣌͸ɺ౰࣌ͷঢ়گΛΑΓϦΞϧʹ఻͑ΔͨΊʹJTTVFͳͲͷ
    ը໘ΩϟϓνϟΛ͜͜ʹೖΕ͍ͯ·͕ͨ͠ɺ
    ಛఆͷݸਓ΁ͷ൷൑ʹܨ͕Γ͔Ͷͳ͍ͨΊɺެ։͢ΔεϥΠυͰ͸߇͍͖͑ͤͯͨͩ͞·͢

    View full-size slide

  39. ೥ʹ4NBSU#FBS͕ࣾεϙϯαʔγοϓΛҾ͖ܧ͍ͩͱ͖ͷهࣄ
    w 5POZ5BNࢯ 4XBHHFSϓϩδΣΫτ૑࢝ऀͷͻͱΓ
    ͕4NBSU#FBSࣾΛબΜͩཧ༝
    Λޠ͍ͬͯΔ
    IUUQTXXXJOGPRDPNOFXTTXBHHFSGPVOEFSXIBUTOFYU
    ൴Β 4NBSU#FBS
    ͕

    ࣗݾརӹͷͨΊ͚ͩʹ
    4XBHHFSΛར༻͢Δ͜ͱ͸ͳ͍
    ͱ֬৴͍ͯ͠Δ
    ݱࡏͷৼΔ෣͍͔Β͸
    ͦͷΑ͏ʹ͸ײ͡ΒΕͳ͘
    ͳ͍ͬͯΔ

    View full-size slide

  40. ։ൃίϛϡχςΟ͸
    4NBSU#FBSࣾͷϏδωεʹແঈͰߩݙ͢Δ
    ϘϥϯςΟΞͰ͸ͳ͍

    View full-size slide

  41. w4NBSU#FBSࣾͷ։ൃίϛϡχςΟΛܰࢹͨ͠ಈ͖ʹɺࠞཚͨ͠Γٙ໰Λ๊͘։
    ൃऀ͕ͨͪग़ͯ͘Δ
    w͜ͷঢ়گΛվળ͢ΔͨΊʹ8JMMJBN τοϓίϯτϦϏϡʔλ
    ͕4NBSU#FBSࣾ
    ͱ࿩͠߹͍ΛॏͶΔ
    w͕ɺ4NBSU#FBSࣾ͸શ͘ฉ͖ೖΕͳ͔ͬͨ
    w8JMMJBN͸4NBSU#FBSࣾͷઆಘΛఘΊɺࠓޙʹ͍ͭͯ։ൃίϛϡχςΟͱ࿩͠
    ߹ͬͨ
    4XBHHFS$PEFHFOΛϑΥʔΫͯ͠ผͷϓϩδΣΫτͱͯ͠
    ίϛϡχςΟɾυϦϒϯͳ։ൃΛਐΊΔ͜ͱΛܾΊΔ
    William(@wing328)
    (2018೥3݄ࠒ)
    0QFO"1*(FOFSBUPSϑΥʔΫͷഎܠ ৽ϓϩδΣΫτͷελʔτ

    View full-size slide

  42. w8JMMJBNͷݺͼ͔͚Ͱू·ͬͨਓҎ্ͷίϯτϦϏϡʔλʹΑͬͯ0QFO"1*
    (FOFSBUPSͷॳظ։ൃ͕ߦΘΕͨ
    wϓϩδΣΫτͷެ։·Ͱ͸ϓϥΠϕʔτϦϙδτϦͰ։ൃ
    w0QFO"1*ରԠͷͨΊʹҎ্ͷϓϧϦΫΤετ͕ग़͞Εͨ
    wܞΘͬͨϝϯόʔ͸3&"%.&ʹ'PVOEJOH.FNCFSͱͯ͠ܝࡌ͞Ε͍ͯΔ
    w IUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPSGPVOEJOHNFNCFSTBMQIBCFUJDBMPSEFS
    w0QFO"1*ͷରԠ͕Ұ௨Γ׬ྃ͠ɺ೥݄೔ʹϕʔλ൛ͱͯ͠ެ։
    0QFO"1*(FOFSBUPSॳظ։ൃΛܦͯϕʔλ൛Λެ։

    View full-size slide

  43. ϦϙδτϦΛެ։
    ࠷ॳͷ҆ఆ൛ΛϦϦʔε

    View full-size slide

  44. 0QFO"1*(FOFSBUPSೝ஌౓ͷߴ·Γ
    ϒϩά ٕज़ܥϝσΟΞ
    ެࣜ5XJUUFSΞΧ΢ϯτ
    (JU)VCελʔ਺

    View full-size slide

  45. w-JOPEFࣾ
    w0QFO"1*(FOFSBUPS0OMJOFΛϗετ͍ͯ͠
    ΔαʔόʔΛ-JOPEF͔ࣾΒఏڙ͍͍ͯͨͩ͠
    ͍ͯΔ
    w63-IUUQBQJPQFOBQJHFOFSBUPSUFDI
    w ˞0QFO"1*(FOFSBUPS0OMJOF
    w ίʔυੜ੒αʔόʔͷػೳ
    w IUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPSCMPCNBTUFS
    EPDTPOMJOFNE
    0QFO"1*(FOFSBUPSاۀ͔Βͷαϙʔτ
    IUUQTXXXMJOPEFDPN

    View full-size slide

  46. 0QFO"1*(FOFSBUPSϢʔβʔͷ֦େ
    IUUQTPQFOBQJHFOFSBUPSUFDIVTFSTIUNM
    w׆༻͍͍͍ͯͨͩͯ͠ΔاۀΛ

    υΩϡϝϯταΠτʹܝࡌ
    w΢ν΋࢖ͬͯΔΑʂͱ͍͏͔ͨ͸
    ͥͻϓϧϦΫΤετΛ͍ͩ͘͞
    wl&EJUUIJTQBHFzͷϦϯΫ͔Β

    ϓϧϦΫΤετΛग़ͤ·͢ʂ

    View full-size slide

  47. 0QFO"1*(FOFSBUPSఆظతͳϦϦʔε
    wύονϦϦʔεִि
    wޙํޓ׵ੑͷ͋Δมߋ
    wϚΠφʔϦϦʔεִ݄
    wޙํޓ׵ੑͷͳ͍มߋ
    w Φϓγϣϯ౳ͰҎલͷڍಈΛ࠶ݱՄ

    wϝδϟʔϦϦʔε൒೥ຖ
    wޙํޓ׵ੑͷͳ͍มߋ
    IUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPSXJLJ(JU#SBODIFT

    View full-size slide

  48. 0QFO"1*(FOFSBUPS։ൃίϛϡχςΟ
    w 3&"%.&l"CPVUVTzIUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPSBCPVUVT
    w5FNQMBUF$SFBUPS
    wݴޠɺϑϨʔϜϫʔΫͳͲͷςϯϓϨʔτΛ࡞੒ͨ͠ਓͨͪ
    w5FDIOJDBM$PNNJUUFF
    wಛఆͷݴޠ޲͚ͷJTTVFɾ13ͷϨϏϡʔͳͲΛߦ͏ਓͨͪ
    w$PSF5FBN
    wϓϩδΣΫτʹϓϥεʹͳΔͰ͋Ζ͏ࣄΛ΍Δਓͨͪ
    wϚʔδݖݶ͋Γ

    View full-size slide

  49. 0QFO"1*(FOFSBUPSΑΓڧ͍ίϛϡχςΟ΁
    w0QFO"1*(FOFSBUPS͸lίϛϡχςΟओମzͷϓϩδΣΫτ
    w΋ͬͱͨ͘͞Μͷ։ൃऀʹؔΘ͍͖͍ͬͯͨͩͨ
    w৽͍͠໾ׂΛ৽ઃͯ͠ɺΞΫςΟϒʹ׆ಈ͞Ε͍ͯΔํʹϚʔδݖݶΛ౉ͯ͠
    ͍͘ࢼΈ͕Ұ෦ࢼݧతʹ࢝·͍ͬͯΔ
    ϓϩδΣΫτͷԣ΁ͷ޿͕Γ͚ͩͰͳ͘
    ؔ৺ͷߴ͍։ൃऀ͸ΑΓਂؔ͘Θ͍͚ͬͯΔΑ͏ॎͷ޿͕Γ΋࡞͍ͬͯ͘

    View full-size slide

  50. 0QFO"1*(FOFSBUPSΑΓڧ͍ίϛϡχςΟ΁
    ಺෦ߏ଄ͷϦϑΝΫλϦϯά
    ৽͍͠δΣωϨʔλͷ࣮૷
    0QFO"1*ରԠͷڧԽ
    ։ൃͷϩʔυϚοϓ

    View full-size slide

  51. ,&&1$"-.
    BOE
    (&/&3"5&$0%&

    View full-size slide

  52. 0QFO"1*υΩϡϝϯτͷهड़
    ࢓༷ͷڞ༗ɾ֬ೝ
    Swagger Editor
    Swagger UI
    0QFO"1*(FOFSBUPSͰίʔυੜ੒͢Δ
    IUUQTCMPHPOLOJOKBTDIFNB@pSTU@EFWFMPQNFOU
    API هड़ݴޠҎޙͷੈք
    ελϒੜ੒ػೳΛར༻ͨ͠εΩϟϑΥʔϧσΟϯά
    ੜ੒ͨ͠ελϒΛར༻ͨ͠ฏߦ։ൃ
    ੜ੒ͨ͠ΫϥΠΞϯτΛར༻ͨ͠޻਺࡟ݮ
    ςετίʔυͷࣗಈੜ੒
    OpenAPI Generator

    View full-size slide

  53. OpenAPI Generator
    ͸͡Ί͔ͨ

    View full-size slide

  54. υΩϡϝϯταΠτ
    5IBOLT!KJNTDIVCFSU✨
    IUUQTPQFOBQJHFOFSBUPSUFDI
    ࠷ۙυΩϡϝϯταΠτ͕Ͱ͖·ͨ͠ʂ

    View full-size slide

  55. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨଟ༷ͳΠϯλʔϑΣʔε
    wίϚϯυ
    w)PNFCSFXɺOQNɺ%PDLFSΠϝʔδɺKBSϑΝΠϧ
    wϏϧυπʔϧͷϓϥάΠϯ
    w.BWFOɺ(SBEMF
    w0QFO"1*(FOFSBUPS0OMJOF
    wίʔυੜ੒༻ͷ)551αʔόʔΛࣾ಺౳ʹཱͯΔػೳ

    View full-size slide

  56. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨجຊίϚϯυ
    αϒίϚϯυ
    0QFO"1*υΩϡϝϯτͷύε
    δΣωϨʔλ໊ ੜ੒͢ΔݴޠɾϑϨʔϜϫʔΫͳͲ

    ग़ྗઌ

    View full-size slide

  57. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨੜ੒͞ΕΔϑΝΠϧͷྫ
    ྫ1)1ΫϥΠΞϯτ

    "1* Ϟσϧ
    υΩϡϝϯτ
    ੜ੒͞Εͨ"1*ΫϥΠΞϯτ΍Ϟσϧͷ࢓༷͕

    ϚʔΫμ΢ϯͰॻ͔ΕͨυΩϡϝϯτ

    View full-size slide

  58. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨੜ੒͞ΕΔϑΝΠϧͷྫ
    ྫ1)1ΫϥΠΞϯτ

    "1*ΫϥΠΞϯτΫϥε

    View full-size slide

  59. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨੜ੒͞ΕΔϑΝΠϧͷྫ
    ྫ1)1ΫϥΠΞϯτ

    Ϟσϧ

    View full-size slide

  60. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨੜ੒͞ΕΔϑΝΠϧͷྫ
    ྫ1)1ΫϥΠΞϯτ

    ςετ
    1)16OJUΛ࢖ͬͨςετίʔυ

    ͷΨϫ͚͕ͩੜ੒͞ΕΔ
    ɹɹɹɹɹ

    View full-size slide

  61. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨجຊίϚϯυ
    ͲΜͳαϒίϚϯυ͕͋Δͷ͔஌Γ͍ͨͱ͖
    ɹˠlIFMQzαϒίϚϯυ
    αϒίϚϯυʹࢦఆͰ͖ΔΦϓγϣϯΛ஌Γ͍ͨͱ͖
    ɹˠzIFMQ\αϒίϚϯυ^z

    View full-size slide

  62. 0QFO"1*(FOFSBUPSͷ͸͡Ί͔ͨجຊίϚϯυ
    δΣωϨʔλݻ༗ͷΦϓγϣϯΛ஌Γ͍ͨͱ͖ ྫ1)1ΫϥΠΞϯτ

    ɹˠlDPOpHIFMQzαϒίϚϯυ
    ͲΜͳδΣωϨʔλ HΦϓγϣϯͷ஋
    ͕͋Δͷ͔஌Γ͍ͨͱ͖
    ɹˠҾ਺ΛԿ΋ࢦఆ͠ͳ͍

    View full-size slide

  63. OpenAPI Generator
    ͷग़ྗΛΧελϚΠζ͢Δ

    View full-size slide

  64. 0QFO"1*(FOFSBUPSύοέʔδ໊Λࢦఆ͢Δ
    wŠBQJQBDLBHF
    wŠNPEFMQBDLBHF

    View full-size slide

  65. 0QFO"1*(FOFSBUPSੜ੒͢ΔϑΝΠϧΛݶఆ͢Δ
    wϞσϧ͚ͩੜ੒͢Δ৔߹l%NPEFMTz
    wͦͷଞ
    w%BQJTɺ%TVQQPSUJOH'JMFT
    wςετ͸ཁΒͳ͍৔߹
    w%NPEFM5FTUTGBMTFɺ%BQJ5FTUTGBMTF

    View full-size slide

  66. 0QFO"1*(FOFSBUPSੜ੒͢ΔܕΛࢦఆ͢Δ
    wŠUZQFNBQQJOHTͰܕͷϚοϐϯάΛࢦఆ͢Δ
    ྫ೔࣌Λѻ͏ΫϥεͰ͸-PDBM%BUF5JNFΛ࢖͍͍ͨ৔߹

    View full-size slide

  67. 0QFO"1*(FOFSBUPSΠϯϥΠϯͰఆٛͨ͠Ϟσϧͷ໊લΛࢦఆ͢Δ
    ࣗಈతʹ෇༩͞ΕΔϞσϧ໊͕ඍົͳͱ͖͸ʜ

    View full-size slide

  68. 0QFO"1*(FOFSBUPSΠϯϥΠϯͰఆٛͨ͠Ϟσϧͷ໊લΛࢦఆ͢Δ
    ˠεοΩϦʂ
    w $PNNVOJUZϞσϧͷlNFNCFSTzϓϩύςΟʹ
    w l.FNCFSzϞσϧͷ഑ྻΛ࣋ͭΑ͏ʹͳΔ
    0QFO"1*υΩϡϝϯτͷlUJUMFzଐੑΛࢦఆ͢Δ͜ͱͰɺ

    View full-size slide

  69. OpenAPI Generator
    ͦͷଞ΋Ζ΋Ζ

    View full-size slide

  70. 0QFO"1*(FOFSBUPSੜ੒࣌ͷϩά͕͏Δ͍͞ͱ͖
    l%MPHMFWFMzͰϩάϨϕϧΛࢦఆ͢Δ

    View full-size slide

  71. 0QFO"1*(FOFSBUPS্ॻ͖ͷڍಈΛ੍ޚ͍ͨ͠ͱ͖
    wҰ཯Ͱ্ॻ͖ͨ͘͠ͳ͍৔߹͸lŠTLJQPWFSXSJUFzΦϓγϣϯ
    w͜·੍͔͘ޚ͍ͨ͠৔߹͸PQFOBQJHFOFSBUPSJHOPSFϑΝΠϧΛ࢖͏
    wHJUJHOPSFͱಉ͡Α͏ͳจ๏
    ͢΂ͯͷCVJMETI
    ϧʔτͷCVJMETI
    EPDT഑Լ͢΂ͯ
    EPDT6TFS"QJNE͸্ॻ͖͢Δ
    TSD഑Լͷ"QJ͸্ॻ͖͠ͳ͍

    View full-size slide

  72. 0QFO"1*(FOFSBUPS0QFO"1*υΩϡϝϯτͷόϦσʔγϣϯ
    εΩʔϚۦಈ։ൃΛ࣮ફ͢Δ͜ͱͰ։ൃͷޮ཰্͕͕ͬͨʂ࠷ߴʂ
    Ͱ΋ɺ0QFO"1*υΩϡϝϯτΛϛεͳ͘ॻ͘ͷ͸େมʜɻ
    ϨϏϡʔͰຖճ4XBHHFS&EJUPSΛ࢖ͬͯΤϥʔ͕ͳ͍͔֬ೝ͢Δ
    ͷ͸໘౗ͩ͠ɻྑ͍ํ๏͕ͳ͍͔ͳ͊ʜ

    lWBMJEBUFzαϒίϚϯυΛ࢖͑͹
    0QFO"1*υΩϡϝϯτͷจ๏νΣοΫΛ$*Ͱग़དྷ·͢

    View full-size slide

  73. 0QFO"1*(FOFSBUPS0QFO"1*υΩϡϝϯτͷόϦσʔγϣϯ
    wσϑΥϧτͰɺίʔυੜ੒࣌ʹ΋όϦσʔγϣϯ͕૸͍ͬͯΔ
    wlWBMJEBUFzαϒίϚϯυ͸!UBYQPO͞Μ͕࣮૷ͯͩͬͨ͘͠͞!ײँ
    ิ଍

    ࣮ߦྫඞਢͷϑΟʔϧυ͕ൈ͚͍ͯͨͱ͖
    !UBYQPO

    View full-size slide

  74. ίʔυੜ੒࣌ʹࢦఆ͢Δ৭ʑͳΦϓγϣϯͷψέ΍ϒϨ͕ͳ͍Α͏
    ʹ౷Ұ͍ͨ͠ɻ͋ͱ࢖͏0QFO"1*(FOFSBUPSͷόʔδϣϯ΋ɻ
    8JOEPXT΍Β.BD΍ΒϝϯόʔʹΑͬͯ৭ʑ͔ͩΒͦͷ΁Μ΋ߟྀ
    ͠ͳ͍ͱʜ

    0QFO"1*(FOFSBUPS։ൃϝϯόʔ಺Ͱॾʑ౷Ұ͍ͨ͠

    View full-size slide

  75. wΦϓγϣϯΛ+40/ϑΝΠϧʹ·ͱΊ͓͍ͯͯɺzDzΦϓγϣϯͰύεΛ౉͢
    w+40/ϑΝΠϧ͸όʔδϣϯ؅ཧ͢Δ
    w.BWFOɺ(SBEMFΛ࢖͍ͬͯΔϓϩδΣΫτͳΒɺϓϥάΠϯΛ࢖͏ͷ͕Ұ൪
    ྑͦ͞͏
    wΦϓγϣϯ΋ϏϧυπʔϧͷઃఆϑΝΠϧʹॻ͚Δ
    ࢦఆ͢ΔΦϓγϣϯͷψέɾϒϨΛ๷ࢭ
    0QFO"1*(FOFSBUPSͷόʔδϣϯΛ౷Ұ
    0QFO"1*(FOFSBUPS։ൃϝϯόʔ಺Ͱॾʑ౷Ұ͍ͨ͠

    View full-size slide

  76. "1*αʔόʔͷιʔείʔυʹॻ͍ͨΞϊςʔγϣϯ͔Β0QFO"1*υ
    ΩϡϝϯτΛੜ੒͢Δํ๏΋͋ΔΈ͍ͨɻ
    0QFO"1*υΩϡϝϯτΛઌʹهड़͢Δํ๏ͱɺͲ͕͍͍ͬͪͷʁ

    εΩʔϚۦಈ։ൃΛߦ͏ͳΒ͹ɺ
    0QFO"1*υΩϡϝϯτ εΩʔϚ
    Λઌʹهड़͠·͠ΐ͏
    αʔόʔͷίʔυ͔ΒυΩϡϝϯτΛੜ੒͢Δํ๏΋͋Δ͚Ͳʁ

    View full-size slide

  77. w͸͡ΊʹεΩʔϚΛΈΜͳͰ૬ஊ͠ͳ͕ΒܾΊͯɺͦΕΛ΋ͱʹαʔόʔͱΫ
    ϥΠΞϯτΛฒߦͯ͠։ൃ͢Δ͜ͱͰޮ཰Λ্͛Δͷ͕εΩʔϚۦಈ։ൃ
    wͳͷͰɺ0QFO"1*υΩϡϝϯτΛઌʹهड़͢Δ
    wαʔόʔͱΫϥΠΞϯτͷ։ൃ͕෼཭͍ͯ͠Δ৔߹
    wྫ,VCFSOFUFTͷ3&45"1*
    wl,VCFSOFUFTͷ։ൃzͱl,VCFSOFUFT ͷ3&45"1*
    Λ࢖͏ΫϥΠΞϯτz
    ͷ։ൃϑϩʔ͸෼཭͍ͯ͠Δ
    w IUUQTHJUIVCDPNLVCFSOFUFTDPNNVOJUZCMPCNBTUFSDPOUSJCVUPSTEFWFMTJHBQJNBDIJOFSZHFOFSBUJOHDMJFOUTFUNE
    ҰํͰɺ"1*αʔόʔͷίʔυ͔Β0QFO"1*υΩϡϝϯτΛੜ੒ͨ͠ํ͕ྑ͍৔߹ͱ͸ʁ
    αʔόʔͷίʔυ͔ΒυΩϡϝϯτΛੜ੒͢Δํ๏΋͋Δ͚Ͳʁ

    View full-size slide

  78. ͦ͏͍͑͹ੜ੒ͨ͠ίʔυͷϥΠηϯεͬͯͲ͏ͳΔͷʁ

    0QFO"1*(FOFSBUPSੜ੒ͨ͠ίʔυͷϥΠηϯε͸ʁ
    ੜ੒ͨ͠ίʔυ͸Ϣʔβʔ͕ॴ༗͢Δ΋ͷͰ͋Γ

    ໨తʹԠͯࣗ͡༝ʹϥΠηϯεΛద༻͢Δ͜ͱ͕Ͱ͖·͢
    IUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPSMJDFOTFJOGPSNBUJPOPOHFOFSBUFEDPEF

    View full-size slide

  79. ίʔυੜ੒
    Ξϯνύλʔϯ

    View full-size slide

  80. ίʔυੜ੒ͷΞϯνύλʔϯ
    wमਖ਼ͨ͠Օॴ͕࣍ճੜ੒࣌ʹ্ॻ͖͞Εͯ͠·͏
    wͱ͸͍͑ɺ্ॻ͖͠ͳ͍ͱ"1*ఆٛͱίʔυ͕ဃ཭ͯ͠͠·͏
    ੜ੒ͨ͠ίʔυʹखͰमਖ਼ΛՃ͑Δ

    View full-size slide

  81. (FOFSBUJPO(BQύλʔϯʹΑΔղܾ
    wࣗಈੜ੒͢Δίʔυ͸৮Βͳ͍
    wॲཧΛ௥Ճ͍ͨ͠৔߹͸ܧঝɾҕৡ౳Λ࢖͏
    (FOFSBUJPO(BQύλʔϯ
    IUUQTXXXIZVLJDPNEQEQJOGPIUNM(FOFSBUJPO(BQ
    0QFO"1*(FOFSBUPSͷ
    εΩϟϑΥʔϧυ༻్Ͱߟ͑ͨ৔߹ͷ
    ελϒαʔόʔੜ੒ػೳͰɺ
    (FOFSBUJPO(BQύλʔϯͷ࣮ફΛࢧԉ͢ΔࢼΈ͕͞Ε͍ͯΔͷͰ঺հ͠·͢

    View full-size slide

  82. w4MJN 1)1
    ͷ৔߹
    wW͔Β͸ɺίϯτϩʔϥ͸ந৅ΫϥεΛੜ੒͢ΔΑ͏ʹͳͬͨ
    wIUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPSQVMM
    w4QSJOH +BWB
    ͷ৔߹
    wlJOUFSGBDF0OMZzͱ͍͏Φϓγϣϯ͕͋Δ
    wIUUQTHJUIVCDPN0QFO"1*5PPMTPQFOBQJHFOFSBUPSCMPCNBTUFS
    EPDTHFOFSBUPSTTQSJOHNE
    0QFO"1*(FOFSBUPS(FOFSBUJPO(BQύλʔϯΛద༻͢Δ

    View full-size slide

  83. 0QFO"1*(FOFSBUPS(FOFSBUJPO(BQύλʔϯΛద༻͢Δ
    w͜ͷΑ͏ͳػೳ͸δΣωϨʔλʹΑͬͯαϙʔτঢ়گ͕͞·͟·
    wΈͳ͞Μ͕ར༻͍ͨ͠δΣωϨʔλͰαϙʔτ͕ෆे෼ͳ৔߹͸ͥͻJTTVFΛ
    ্͛ͯΈ͍ͯͩ͘͞
    w΋ͪΖΜϓϧϦΫΤετ΋େ׻ܴͰ͢

    View full-size slide

  84. 0QFO"1*(FOFSBUPSϓϧϦΫνϟϯε͔΋
    wੜ੒ͨ͠ίʔυʹखΛೖΕͨ͘ͳͬͨͱ͖ɺ
    w΋͔ͨ͠͠Βͦͷमਖ਼͸0QFO"1*(FOFSBUPSࣗମʹೖΕͨํ͕ྑ͍ͷ͔΋͠
    Ε·ͤΜ
    wϓϧϦΫνϟϯε͔΋
    wࠃ಺ΤϯδχΞ޲͚ͷ(JUUFSνϟοτϧʔϜ͕͋Γ·͢ͷͰࠔΓ͝ͱ͕͋Ε
    ͹ͥͻؾܰʹ
    wIUUQTHJUUFSJNPQFOBQJHFOFSBUPSKBQBOFTF-PCCZ

    View full-size slide

  85. ίʔυੜ੒Λ׆༻ͯ͠
    ޮ཰తͳ։ൃΛʂ

    View full-size slide

  86. Έͳ͞Μͷ͝ࢀՃΛ͓଴͍ͪͯ͠·͢ʂ

    View full-size slide

  87. ,&&1$"-.
    BOE
    (&/&3"5&$0%&

    View full-size slide