Skip to content

icemokacat/bruno-viewer

Repository files navigation

πŸ¦„ Bruno API Client Docs Viewer

License

무료둜 μ‚¬μš©ν•  수 μžˆλŠ” bruno api client μ—μ„œ docs 의 λ§ˆν¬λ‹€μš΄μ„ λ³Ό 수 μžˆλŠ” ν”„λ‘œκ·Έλž¨μž…λ‹ˆλ‹€.

Report bug

πŸ“‘ Table of Contents

πŸ’‘ About the Project

  • λΈŒλ£¨λ…Έ Api Client μ—μ„œ μ œκ³΅ν•œλŠ” Docs 만 λ³„λ„λ‘œ κ΄€λ¦¬ν•˜κΈ° μœ„ν•΄ λ§Œλ“€μ–΄μ§„ ν”„λ‘œμ νŠΈμž…λ‹ˆλ‹€.
  • λ¬Έμ„œλ§Œ λ³„λ„λ‘œ κ΄€λ¦¬ν•˜λ©΄μ„œ, Front-end μ—μ„œ custom ν•˜κ²Œ λ””μžμΈν•˜μ—¬ λ³΄κΈ°μ’‹κ²Œ κ³΅μœ ν•˜κΈ° μœ„ν•΄ λ§Œλ“€μ—ˆμŠ΅λ‹ˆλ‹€.
  • .bru νŒŒμΌμ„ μ½μ–΄μ„œ docs {} λΆ€λΆ„μ˜ markdown 을 μ½μ–΄μ„œ λ³΄μ—¬μ€λ‹ˆλ‹€.

πŸ“ Features

JavaSpringThymeleaf

πŸ”¨ Technologies

⚑ Getting Started

Prerequisites

  • Java 17.0.10+11-LTS-240

Installation

Repository 클둠

git clone https://github.com/icemokacat/bruno-viewer.git

Configuration

  • application-dev.yml 을 μ°Έκ³ ν•˜μ—¬ application-local.yml 을 λ§Œλ“€μ–΄μ„œ μ‚¬μš©ν•˜μ„Έμš”.
  • Active profiles local 둜 μ„€μ •ν•˜μ—¬ μ‹€ν–‰ν•˜μ„Έμš”.
server:
  port: 7001

bruno:
  # .bru 파일이 μžˆλŠ” Collection의 폴더 경둜 ν˜Ήμ€ Collection 이 λͺ¨μ—¬ μžˆλŠ” 루트 path λ₯Ό μ„€μ •ν•˜μ„Έμš”
  root-path: C:\work\bruno-project\

Usage

Springboot μ‹€ν–‰ or jar build ν›„ localhost:{port} μ‹€ν–‰

bru 파일의 κ²½λ‘œκ°€ μ•„λž˜μ™€ κ°™μ„λ•Œ

{root-path}{μƒλŒ€κ²½λ‘œ}

1. Page View 방식 (thymeleaf view lendering)

http://localhost:{port}/page/bruno/{μƒλŒ€κ²½λ‘œ} λ₯Ό ν˜ΈμΆœν•˜μ—¬ .bru λ‚΄ markdown 을 λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.

κ²°κ³Όμ˜ˆμ‹œν™”λ©΄

πŸ’‘ μ˜ˆμ‹œλ‘œ μ‚¬μš©ν•œ md λ¬Έμ„œλŠ” μ•„λž˜μ˜ λ§ν¬μž…λ‹ˆλ‹€.

https://gist.github.com/azagniotov/a4b16faf0febd12efbc6c3d7370383a6#file-beautiful-rest-api-docs-in-markdown-md

2. HTTP API 호좜 방식

http://localhost:{port}/api/bruno/{μƒλŒ€κ²½λ‘œ} λ₯Ό ν˜ΈμΆœν•˜λ©΄ .bru λ‚΄ markdown 을

html code둜 parsing ν•œ λ¬Έμžμ—΄ 데이터λ₯Ό λ°˜ν™˜ ν•©λ‹ˆλ‹€.

κ²°κ³Όμ˜ˆμ‹œν™”λ©΄

πŸ’‘ μ˜ˆμ‹œλ‘œ μ‚¬μš©ν•œ md λ¬Έμ„œλŠ” μ•„λž˜μ˜ λ§ν¬μž…λ‹ˆλ‹€.

https://gist.github.com/azagniotov/a4b16faf0febd12efbc6c3d7370383a6#file-beautiful-rest-api-docs-in-markdown-md

3. bru collection λ‚΄ 디렉토리 및 bru 파일 리슀트 확인

http://localhost:{port}/api/bruno-path

  • Method : GET
  • Parameter : dir (폴더λͺ…)
  • Response OK Data
    {
      "httpStatus": "OK",
      "message": "OK",
      "data": [
        {
          "isBru": false,
          "directoryPath": "myapp/environments",
          "directoryName": "environments"
        },
        {
          "isBru": true,
          "directoryPath": "myapp/login.bru",
          "directoryName": "login.bru"
        }
      ]
    }

πŸ“š Acknowledgement

✨ License

Apache License 2.0

λΌμ΄μ„ΌμŠ€μ— λŒ€ν•œ μ •λ³΄λŠ” LICENSE에 μžˆμŠ΅λ‹ˆλ‹€.

About

viewer for markdown docs in bru file

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published