V
V
v- death2015-10-28 13:56:20
API
v- death, 2015-10-28 13:56:20

Code documentation. Am I doing the right thing?

Hello. Near the router path I make a command with a detailed description.
There are two questions.
Is it worth it to do so?
Am I documenting clearly?

/*
              отвечает за добавление нового человека в базу
              Принимает
                user/reg.Auth/{
                  "login" : "%login%",
                      "email" : "%email%",
                  "pass"  : "%pass%"
                }
                %login% - логин добавляемого человека.
                %email% - email человека
                %pass%  - password человека

                  Возвращает
                      {
                          "operation"          : "true//false",
                          "operation_messages" : "%description%"
                      }
                      operation  -> true  - операция выполнена успешно
                                 -> false - произошла ошибка
                        operation_messages -> operation  -> true  -> "Ok"
                                           -> operation  -> false -> "Error description"

  */
  router.GET("/reg.Auth/:json", auth.Create)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dokuro, 2015-10-28
@vGrabko99

I don't like documented code. If the code is written well and the person who reads it is not stupid, everything is clear.
Yes, and somehow the documented code does not look nice, I really don’t like it)
Although this is my personal opinion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question