Slide 1

Slide 1 text

߅ਊӂ ਋ܽ э਷ Ҕਸ ߄ۄ ࠁҊ ੓աਃ? न܉ೡ ࣻ ੓ח APIী ؀ೠ Ҋ޹җ ೧ߨਸ ଺ইࢲ-

Slide 2

Slide 2 text

https://flic.kr/p/2jmXLKR ૑Ә਷ഈস੄द؀

Slide 3

Slide 3 text

௿ۄ੉঱౟৬ ࢲߡח যڌѱഈসೡөਃ https://flic.kr/p/6e1FDq

Slide 4

Slide 4 text

https://flic.kr/p/irZCsH ప௼झಖ੘ࢿ੉ഈস੄द੘੉঻ҵਃ

Slide 5

Slide 5 text

ప௼झಖ਷ যڌѱ ੘ࢿ೧ਃ https://eng.lyft.com/awesome-tech-specs-86eea8e45bb9

Slide 6

Slide 6 text

https://flic.kr/p/R3ScWi ૑Әࠗఢ "1*ী ૘઺೧ࠁભ

Slide 7

Slide 7 text

ਫ਼Ӭ"1*оޤભ https://www.manning.com/books/the-design-of-web-apis

Slide 8

Slide 8 text

Consumer Provider HTTP Client HTTP Server ਃ୒ 3FRVFTU ਽׹ 3FTQPOTF 3&45"1*BLB3&45GVMPS8FC"1*PS)551"1* ੗ਗ(RESOURCE) - URI ೯ਤ(Verb) - HTTP Method ಴അ(Representations) )551೐۽ష௒ӝ߈ ਢӝࣿ੉о૓न܉ࢿ ഛ੢ࢿਸӒ؀۽੉য߉ই࠙࢑ஹೊ౴ী੸೤ೠ"1*ٜ݅ࣻ੓חߑߨਵ۽੗ਗ 3&4063$& 63* ೯ਤ 7FSC )551.&5)0% ಴അ 3FQSFTFOUBUJPOT ਵ۽ҳࢿغয੓׮ ࢲ࠺झઁҕ੗੢গա֎౟ਕ௼૑ো١ਸҊ۰೧ঠೠ׮

Slide 9

Slide 9 text

Consumer Provider RPC Stub RPC Server ਃ୒ 3FRVFTU ਽׹ 3FTQPOTF Shared Library ਗѺ೐۽द੷ഐ୹3FNPUF1SPDFEVSF$BMM31$ ۽ஸ೐۽द੷աݫࣗ٘ܳഐ୹ೞ٠ਗѺदझమীࢲ࠺झܳࢎਊೡࣻ੓חߑߨਵ۽֎౟ਕ௼ܳ੉ਊೠ׮חੋ૑بহ੉ਗѺदझమীࢲ࠺झܳऔѱా೤ೞҊ ࢎਊೡࣻ੓׮ ೞ૑݅فदझమръѾ೤੉ੌযդ׮য়ېػӝࣿэ૑݅ҳӖীࢲҕѐೠH31$੄҃਋ъ۱ೠࢿמҗ׮নೠ೒ۖಬਸ૑ਗೞחبҳ۽୭Ӕ௾ҙबਸ੉ՑҊ੓׮

Slide 10

Slide 10 text

"1*٣੗ੋࠗఠୃӡѱਃ https://careerfoundry.com/en/blog/ui-design/8-sites-with-great-ui/

Slide 11

Slide 11 text

https://flic.kr/p/4QGtMD ҅ডী੄ೠࢸ҅%FTJHOCZ$POUSBDU ܳ Ҋ۰ೞݶજইਃ

Slide 12

Slide 12 text

https://flic.kr/p/2mv5Gg5 "1*ݺࣁܳ੘ࢿೞח بҳٜਸঌইࠊਃ

Slide 13

Slide 13 text

https://beestat.io/ NOTION

Slide 14

Slide 14 text

https://www.postman.com/ POSTMAN

Slide 15

Slide 15 text

*%-*OUFSGBDF%FTDSJQUJPO-BOHVBHF ਸ ࢎਊ೧ࠁݶযڄөਃ https://bannortoys.com/products/wooden-shape-sorter

Slide 16

Slide 16 text

https://www.openapis.org/ OpenAPI Specification

Slide 17

Slide 17 text

https://buf.build/ Protocol Buffers

Slide 18

Slide 18 text

Ӓ۽ࠗఠѐਘറ https://flic.kr/p/9dQRes

Slide 19

Slide 19 text

ৈӟয٣ աח־ҳ https://shorturl.at/dnsWY

Slide 20

Slide 20 text

Ҋ޹੄द੘ https://www.flickr.com/photos/absent/2157057475/

Slide 21

Slide 21 text

ࣁо૑ই੉٣য https://flic.kr/p/6go4zT

Slide 22

Slide 22 text

Tech spec IDL repo swift code kotlin code etc go/python/.. Generator "1*ݺࣁ۽௏٘ࢤࢿೞӝ

Slide 23

Slide 23 text

❯ create-api generate schema.json --config-option module=PetstoreKit --output PetstoreKit Generating code for schema.json... import Foundation import Get import PetstoreKit public class PetstoreWebClient { let api: APIClient public init() { self.api = APIClient( baseURL: URL(string: "https://letswift.kr/2022/petstore") ) } public func findPets(by status: Paths.Pet.FindByStatus.Status) async throws -> [Pet] { let request = Paths.pet.findByStatus.get(status: status) let response = try await api.send(request) return response.value } } IDL repo swift package CreateAPI $SFBUF"1*۽4XJGU௏٘ࢤࢿೞӝ ① Using the Code ②

Slide 24

Slide 24 text

import Foundation import PetstoreKit import SwiftGRPC public class PetstoreGrpcClient { let client: PetstoreServiceClient public init() { self.client = PetstoreServiceClient.init( address: "letswift.kr:80", secure: false ) } public func findPets(by status: FindPetsByStatusRequestStatus) async throws -> [Pet] { let request = FindPetsByStatusRequest.init(status: status) let response = try await client.findPetsByStatus(request) return response.pets } } IDL repo petstore.grpc.swift, petsotre.pb.swift gRPC Swift H31$۽4XJGU௏٘ࢤࢿೞӝ Using the Code ② ❯ protoc schema.proto \ --swift_out=Visibility=Public:./PetstoreKit/Sources --grpc-swift_out=Visibility=Public,Client=true,Server=false:./PetstoreKit/Sources ①

Slide 25

Slide 25 text

envoy mobile edge Servers Client ݽ߄ੌਸਤೠ FOWPZNPCJMF Tech spec IDL repo generated code Generator Using the Code

Slide 26

Slide 26 text

Client GraphQL API { "user": { "id": 2022, "name": "Arawn Park", "address": { "city": "Firenze", "street": "Piazza del Duomo" } } } query { user (id: 2022) { id name address { city street } } } HTTP Request HTTP Response ௪ܻझః݃ഛੋ੉оמೠ(SBQI2-

Slide 27

Slide 27 text

Consumer Provider Unit tests Unit tests Required interactions are captured into a contract between systems Contract is shared amongst teams to enable collaboration, using tools like Pactflow Requests in contract replayed against provider API and verified against consumer s expectations Consumer unit tests its behaviour against provider mock Provider tests mock out any other systems, so it can be tested in isolation ① ② ③ ④ ⑤ ҅ডపझ౟$POUSBDU5FTU ೞӝ

Slide 28

Slide 28 text

1BDUGMPX۽ೞח҅ডపझ౟ Consumer Provider Ý GET /users/2022 { "user": { "id": 2022, "name": "Arawn Park" } } GET /users/2022 { "user": { "id": 2022, "name": "Arawn Park" } } Testing a consumer using a Pact mock provider ① mock provider simulated consumer Testing a provider using a Pact simulated consumer ② Contract

Slide 29

Slide 29 text

਋ܽэ਷Ҕਸ ߄ۄࠁҊ੓աਃ https://imaggeo.egu.eu/view/1251/

Slide 30

Slide 30 text

੿ࣁ৔ ੉زѤ ъ؀ӏ ӒܻҊ׼Ӕ݃௄J04ୀఠ https://flic.kr/p/29cXbAf

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

ଵҊ੗ܐ - The Design of Web APIs - Create API - gRPC Swift - Next Generation Client APIs in Envoy Mobile - Move Fast and Consumer Driven Contract Test Things - How Pact contract testing works