Code Monkey home page Code Monkey logo

rest_test's Introduction

REST_TEST 코드 명세

빌드

$ docker-compose up --build

마이그레이션

# 컨테이너로 진입
$ docker exec -it flask_app /bin/bash

# 마이그레이션
$ python db.py db init
$ python db.py db migrate
$ python db.py db upgrade

테스트

# 컨테이너로 진입
$ docker exec -it flask_app /bin/bash

# 테스트 수행
$ cd tests
$ pytest test_main.py -vv (ordering, option)

API 명세

  1. 자동완성

    • endpoint: GET /auto_complete
    • parameter: q: 쿼리 텍스트
    • example: /auto_complete?q=wan
    • response
      [
          <Company Object>,
          ...
      ]
  1. 검색

    • endpoint: GET /search
    • parameter: tag: 태그 텍스트
    • example: /search?tag=태그_4
    • response
      [
          <Company Object>,
          ...
      ]
  1. 태그 추가

    • endpoint: PUT /add_tag/<int:tag>
    • payload: tag-태그 lang-태그 언어
    • example: /add_tag/1 (payload- {"tag":  "태그_99", "lang": "ko"})
    • response
      <Company Object>
  1. 태그 삭제

    • endpoint: PUT /del_tag/<int:tag>
    • payload: tag-태그 lang-태그 언어
    • example: /del_tag/1 (payload- {"tag":  "태그_99", "lang": "ko"})
    • response
      <Company Object>

rest_test's People

Contributors

iedcon avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.