Skip to content

[#35] README.md에 다이어그램을 추가한다#37

Merged
opficdev merged 3 commits intodevelopfrom
docs/#35-readme
Apr 13, 2026
Merged

[#35] README.md에 다이어그램을 추가한다#37
opficdev merged 3 commits intodevelopfrom
docs/#35-readme

Conversation

@opficdev
Copy link
Copy Markdown
Owner

🔗 연관된 이슈

📝 작업 내용

📌 요약

  • README 요청 흐름 다이어그램 추가

🔍 상세

  • Public API 섹션과 Quick Start 섹션 사이 Request Flow 섹션 추가
  • NXClientConfiguration, NXAPIClient, NXRequestBuilder, NXTypedRequestBuilder, NXRequestAssembler, NXInterceptorChain, NXHTTPTransport, NXResponsePipeline 기준 요청 처리 흐름 정리
  • preparedURLRequest(), raw(), send() 호출 기준 분기 흐름 표현

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Apr 13, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 Pull Request는 README.md에 Mermaid 시퀀스 다이어그램을 추가하여 전체적인 요청 흐름을 시각화합니다. 리뷰에서는 다이어그램이 실제 코드의 동작 방식과 다르게 컴포넌트 간 직접 호출로 묘사된 점을 지적하며, Builder가 각 컴포넌트를 순차적으로 호출하고 결과를 전달받는 구조를 정확히 반영하도록 수정을 제안했습니다.

Comment thread README.md
Comment on lines +175 to +193
alt preparedURLRequest()
Builder->>Assembler: assemble()
Assembler-->>App: URLRequest
else raw()
Builder->>Assembler: assemble()
Assembler->>Chain: execute(context)
Chain->>Transport: send(request)
Transport-->>Pipeline: NXRawResponse
Pipeline->>Pipeline: validate()
Pipeline-->>App: NXRawResponse
else send()
Builder->>Assembler: assemble()
Assembler->>Chain: execute(context)
Chain->>Transport: send(request)
Transport-->>Pipeline: NXRawResponse
Pipeline->>Pipeline: validate()
Pipeline->>Pipeline: decode()
Pipeline-->>App: Response
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

다이어그램에서 NXRequestAssemblerNXInterceptorChain을 직접 호출하거나, NXHTTPTransportNXResponsePipeline으로 직접 응답을 전달하는 것으로 묘사되어 있습니다. 실제 코드 구현상 Builder(또는 내부 실행 로직)가 각 컴포넌트를 순차적으로 호출하고 결과를 전달받는 구조이므로, 이를 보다 정확하게 반영하도록 수정하는 것이 좋겠습니다. 특히 AssemblerURLRequest를 생성하여 반환할 뿐 다음 단계를 직접 실행하지 않습니다.

    alt preparedURLRequest()
        Builder->>Assembler: assemble()
        Assembler-->>Builder: URLRequest
        Builder-->>App: URLRequest
    else raw()
        Builder->>Assembler: assemble()
        Assembler-->>Builder: URLRequest
        Builder->>Chain: execute(context)
        Chain->>Transport: send(request)
        Transport-->>Chain: NXRawResponse
        Chain-->>Builder: NXRawResponse
        Builder->>Pipeline: validate()
        Builder-->>App: NXRawResponse
    else send()
        Builder->>Assembler: assemble()
        Assembler-->>Builder: URLRequest
        Builder->>Chain: execute(context)
        Chain->>Transport: send(request)
        Transport-->>Chain: NXRawResponse
        Chain-->>Builder: NXRawResponse
        Builder->>Pipeline: validate()
        Builder->>Pipeline: decode()
        Builder-->>App: Response
    end

@opficdev
Copy link
Copy Markdown
Owner Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

README.md에 Nexa의 요청 처리 흐름을 시각화하는 Mermaid 다이어그램을 추가하여 라이브러리의 동작 구조를 명확히 하였습니다. 리뷰 과정에서 다이어그램 내 raw() 및 send() 흐름 간의 validate() 반환 라벨이 일치하지 않는 점이 발견되었으며, 문서의 일관성과 정확성을 높이기 위해 이를 validated로 통일할 것을 제안합니다.

Comment thread README.md Outdated
Transport-->>Chain: NXRawResponse
Chain-->>Builder: NXRawResponse
Builder->>Pipeline: validate()
Pipeline-->>Builder: NXRawResponse
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

요약

README.md에 Nexa의 요청 처리 흐름을 시각화하는 Mermaid 다이어그램을 추가했습니다. 전체적인 구조와 컴포넌트 간의 상호작용이 코드의 실제 구현과 잘 일치합니다.

피드백

raw() 흐름과 send() 흐름에서 validate() 호출의 반환 라벨이 서로 다릅니다. validate()는 검증만 수행하고 데이터를 변환하지 않으므로, 187행의 NXRawResponse를 197행과 같이 validated 또는 성공을 의미하는 표현으로 통일하는 것이 더 정확합니다.

Suggested change
Pipeline-->>Builder: NXRawResponse
Pipeline-->>Builder: validated
References
  1. 모든 리뷰 코멘트는 한국어로 작성하며, 가독성과 정확성을 우선시합니다. (link)

@opficdev
Copy link
Copy Markdown
Owner Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

README.md에 라이브러리의 요청 흐름을 시각화한 Mermaid 시퀀스 다이어그램이 추가되었습니다. 리뷰를 통해 raw() 메서드 실행 과정에서 Pipeline.validate() 단계가 포함된 것이 설계 의도에 부합하는지 검토하고, 필요시 다이어그램을 수정하여 API의 목적을 더 명확히 표현할 것을 권장했습니다.

Comment thread README.md
Comment on lines +179 to +188
else raw()
Builder->>Assembler: assemble()
Assembler-->>Builder: URLRequest
Builder->>Chain: execute(context)
Chain->>Transport: send(request)
Transport-->>Chain: NXRawResponse
Chain-->>Builder: NXRawResponse
Builder->>Pipeline: validate()
Pipeline-->>Builder: validated
Builder-->>App: NXRawResponse
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

raw() 메서드 호출 시에도 Pipeline.validate()가 수행되는 것으로 묘사되어 있습니다. 일반적으로 'raw' 요청은 HTTP 상태 코드와 관계없이 서버의 응답 본문과 메타데이터를 그대로 확인하려는 용도로 사용됩니다. 만약 Nexa의 설계상 raw() 호출 시에도 기본적으로 유효성 검사를 수행하고 실패 시 에러를 던지는 것이 의도된 것이라면 현재 다이어그램이 적절하지만, 그렇지 않다면 validate() 과정을 제외하여 API의 의도를 더 명확하게 표현하는 것이 좋겠습니다.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raw()는 디코딩 없이 응답을 받는것이지, 검증없이 받는것이 아니므로 반영 X

@opficdev opficdev merged commit cd3d416 into develop Apr 13, 2026
4 checks passed
@opficdev opficdev deleted the docs/#35-readme branch April 13, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README.md에 다이어그램을 추가한다

1 participant