introduce rswag #28

Closed
opened 2022-11-07 12:23:26 +01:00 by philipp · 2 comments
Owner

https://github.com/rswag/rswag#enable-swagger-endpoints-for-swagger-ui

  • add gem and get it running
  • add oauth security to swagger_spec
  • make a test work?
  • user schema
  • move Authorization to a helper
  • remove apivore
  • Edit API docs how to generate the swagger.yml
  • open DRAFT: PR to get earlier feedback (is openapispec 3.0 ok?)
  • error schema definitions

Following upstream: https://github.com/foodcoops/foodsoft/pull/969

  • api endpoints:
    • /user/
      • /user/financial_overview
      • /user/financial_transactions @flip
        • TODO: response 422 - etwas überfragt
      • /user/group_order_articles @flip
    • /financial_transactions @flip
    • /orders @philipp
    • /order_articles @philipp
    • /article_categories
    • /financial_transaction_classes
    • /financial_transaction_types
    • /config
    • /navigation
  • refactor page per_page to a $ref
  • refactor 401 invalid token with params
  • swagger yml nochmal checken
    • summarys und descriptions?
https://github.com/rswag/rswag#enable-swagger-endpoints-for-swagger-ui * [x] add gem and get it running * [x] add oauth security to swagger_spec * [x] make a test work? * [x] user schema * [x] move Authorization to a helper * [x] remove apivore * [x] Edit API docs how to generate the swagger.yml * [x] open DRAFT: PR to get earlier feedback (is openapispec 3.0 ok?) * [x] error schema definitions Following upstream: https://github.com/foodcoops/foodsoft/pull/969 * api endpoints: * [x] /user/ * [x] /user/financial_overview * [x] /user/financial_transactions @flip * [ ] TODO: response 422 - etwas überfragt * [x] /user/group_order_articles @flip * [x] /financial_transactions @flip * [x] /orders @philipp * [x] /order_articles @philipp * [x] /article_categories * [x] /financial_transaction_classes * [x] /financial_transaction_types * [x] /config * [x] /navigation * [x] refactor page per_page to a $ref * [x] refactor 401 invalid token with params * [x] swagger yml nochmal checken * [x] summarys und descriptions?
philipp added this to the Tests milestone 2022-11-07 12:23:26 +01:00
philipp self-assigned this 2022-11-07 12:23:27 +01:00
philipp added a new dependency 2022-11-07 12:25:17 +01:00
philipp added this to the Kanban project 2022-11-21 11:32:22 +01:00
philipp modified the milestone from Tests to Rails Upgrade 2022-11-21 13:49:23 +01:00
Author
Owner

zu dem user/financial_transaction 422 ding,
kanns sein, dass der Test an sich funktioniert, nur der controller halt nicht 422 schmeißt sondern trotz falscher parameter die transaction erstellt?

     Rswag::Specs::UnexpectedResponse:
       Expected response code '200' to match '422'
       Response body: {"financial_transaction":{"id":236,"user_id":432,"user_name":"Hershel ","amount":-3.0,"note":"-2","created_at":"2022-12-08T11:45:06.000+01:00","financial_transaction_type_id":252,"financial_transaction_type_name":"et recusandae et omnis #15"}}

also der eig fehler im controllers/api/v1/financial_transaction_controller.rb liegt?

zu dem user/financial_transaction 422 ding, kanns sein, dass der Test an sich funktioniert, nur der controller halt nicht 422 schmeißt sondern trotz falscher parameter die transaction erstellt? ``` Rswag::Specs::UnexpectedResponse: Expected response code '200' to match '422' Response body: {"financial_transaction":{"id":236,"user_id":432,"user_name":"Hershel ","amount":-3.0,"note":"-2","created_at":"2022-12-08T11:45:06.000+01:00","financial_transaction_type_id":252,"financial_transaction_type_name":"et recusandae et omnis #15"}} ``` also der eig fehler im controllers/api/v1/financial_transaction_controller.rb liegt?
Author
Owner
  • generate the api-spec.yml in dockerfile?
* [ ] generate the api-spec.yml in dockerfile?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: Foodsoft/foodsoft#28
No description provided.