Restful API
Flowchart
소스코드
RestAPI Flowchart 코드// initailize rankdir=TB fontname="맑은 고딕" graph [concentrate=true, splines=ortho, nodesep=0.5] node [peripheries=0, style=filled, fillcolor=lightyellow, fontcolor=black,fontname="맑은 고딕",fixedsize=true, width=1, height=0.4] edge [fontname="맑은 고딕",fontsize=8,fontcolor=black, labeldistance=1.8] start [shape=record, style="filled,rounded", label="HTTP Request", width=1.7] check [shape=rect, style="filled", label="Check HTTP Method\n(GET|POST|PUT|DELETE)", fillcolor="#8ECCFC", width=1.7,height=0.7] end [shape=record, style="filled,rounded", label="HTTP Response", width=1.7] { rank=same; match [shape=rect, style="filled", label="Find Matching API URL", fillcolor="#8ECCFC", width=1.7, height=0.7] is_url [shape=diamond, style="filled",label="URL\nFound?", fillcolor="#8ECCFC", width=1.2, height=1.2] is_protect [shape=diamond, style="filled",label="Protected\nAPI?", fillcolor="#8ECCFC", width=1.2, height=1.2] } subgraph cluster_a { color=white; { rank=same; auth [shape=diamond, style="filled",label="Authenticated?", fillcolor="#8ECCFC", width=1.2, height=1.2] error [shape=rect, style="filled", label="ERROR", fillcolor="#FF682A"] } } subgraph cluster_b { color=white; { rank=same; result [shape=rect, style="filled", label="RESULT", fillcolor="#84FA3F"] method [shape=rect, style="filled", label="API Method", fillcolor=yellow] } } // Draw flow start -> check check -> match match -> is_url is_url -> is_protect [headlabel="YES", color=green] is_url -> error [headlabel="NO", color=red, fontcolor=red] is_protect -> auth [headlabel="YES", color=green] is_protect -> method [headlabel="NO", color=red, fontcolor=red] auth -> error [headlabel="NO", color=red, fontcolor=red] auth -> method [headlabel="YES", color=green] method -> result {error, result} -> end