mirror of https://gitee.com/bigwinds/arangodb
Doc - check for no new line after restdescription (#4883)
This commit is contained in:
parent
5fbb78f4e3
commit
ffe11c652a
|
@ -19,7 +19,6 @@ the name of the AQL user function.
|
||||||
qualified, including any namespaces. If none matches the *name*, HTTP 404 is returned.
|
qualified, including any namespaces. If none matches the *name*, HTTP 404 is returned.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Removes an existing AQL user function or function group, identified by *name*.
|
Removes an existing AQL user function or function group, identified by *name*.
|
||||||
|
|
||||||
@RESTRETURNCODES
|
@RESTRETURNCODES
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{GET /_admin/database/target-version, Return the required version of the database}
|
@RESTHEADER{GET /_admin/database/target-version, Return the required version of the database}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns the database-version that this server requires.
|
Returns the database-version that this server requires.
|
||||||
The version is returned in the *version* attribute of the result.
|
The version is returned in the *version* attribute of the result.
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{POST /_admin/routing/reload, Reloads the routing information}
|
@RESTHEADER{POST /_admin/routing/reload, Reloads the routing information}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Reloads the routing information from the collection *routing*.
|
Reloads the routing information from the collection *routing*.
|
||||||
|
|
||||||
@RESTRETURNCODES
|
@RESTRETURNCODES
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{GET /_admin/server/role, Return role of a server in a cluster}
|
@RESTHEADER{GET /_admin/server/role, Return role of a server in a cluster}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns the role of a server in a cluster.
|
Returns the role of a server in a cluster.
|
||||||
The role is returned in the *role* attribute of the result.
|
The role is returned in the *role* attribute of the result.
|
||||||
Possible return values for *role* are:
|
Possible return values for *role* are:
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{GET /_admin/statistics, Read the statistics}
|
@RESTHEADER{GET /_admin/statistics, Read the statistics}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns the statistics information. The returned object contains the
|
Returns the statistics information. The returned object contains the
|
||||||
statistics figures grouped together according to the description returned by
|
statistics figures grouped together according to the description returned by
|
||||||
*_admin/statistics-description*. For instance, to access a figure *userTime*
|
*_admin/statistics-description*. For instance, to access a figure *userTime*
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{GET /_admin/statistics-description, Statistics description}
|
@RESTHEADER{GET /_admin/statistics-description, Statistics description}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns a description of the statistics returned by */_admin/statistics*.
|
Returns a description of the statistics returned by */_admin/statistics*.
|
||||||
The returned objects contains an array of statistics groups in the attribute
|
The returned objects contains an array of statistics groups in the attribute
|
||||||
*groups* and an array of statistics figures in the attribute *figures*.
|
*groups* and an array of statistics figures in the attribute *figures*.
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{GET /_admin/time, Return system time}
|
@RESTHEADER{GET /_admin/time, Return system time}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
The call returns an object with the attribute *time*. This contains the
|
The call returns an object with the attribute *time*. This contains the
|
||||||
current system time as a Unix timestamp with microsecond precision.
|
current system time as a Unix timestamp with microsecond precision.
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
@RESTHEADER{GET /_api/cluster/endpoints, Get information about all coordinator endpoints}
|
@RESTHEADER{GET /_api/cluster/endpoints, Get information about all coordinator endpoints}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns an object with an attribute `endpoints`, which contains an
|
Returns an object with an attribute `endpoints`, which contains an
|
||||||
array of objects, which each have the attribute `endpoint`, whose value
|
array of objects, which each have the attribute `endpoint`, whose value
|
||||||
is a string with the endpoint description. There is an entry for each
|
is a string with the endpoint description. There is an entry for each
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
The body to be executed.
|
The body to be executed.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Executes the javascript code in the body on the server as the body
|
Executes the javascript code in the body on the server as the body
|
||||||
of a function with no arguments. If you have a *return* statement
|
of a function with no arguments. If you have a *return* statement
|
||||||
then the return value you produce will be returned as content type
|
then the return value you produce will be returned as content type
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
|
|
||||||
@RESTQUERYPARAM{DBserver,string,required}
|
@RESTQUERYPARAM{DBserver,string,required}
|
||||||
|
|
||||||
@RESTDESCRIPTION Queries the statistics of the given DBserver
|
@RESTDESCRIPTION
|
||||||
|
Queries the statistics of the given DBserver
|
||||||
|
|
||||||
@RESTRETURNCODES
|
@RESTRETURNCODES
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
The name of the cursor
|
The name of the cursor
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
If the cursor is still alive, returns an object with the following
|
If the cursor is still alive, returns an object with the following
|
||||||
attributes:
|
attributes:
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
The collection name.
|
The collection name.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns an object with an attribute *indexes* containing an array of all
|
Returns an object with an attribute *indexes* containing an array of all
|
||||||
index descriptions for the given collection. The same information is also
|
index descriptions for the given collection. The same information is also
|
||||||
available in the *identifiers* as an object with the index handles as
|
available in the *identifiers* as an object with the index handles as
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
The index-handle.
|
The index-handle.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
The result is an object describing the index. It has at least the following
|
The result is an object describing the index. It has at least the following
|
||||||
attributes:
|
attributes:
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
The index handle.
|
The index handle.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Deletes an index with *index-handle*.
|
Deletes an index with *index-handle*.
|
||||||
|
|
||||||
@RESTRETURNCODES
|
@RESTRETURNCODES
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
Contains the query.
|
Contains the query.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns all documents of a collections. Equivalent to the AQL query
|
Returns all documents of a collections. Equivalent to the AQL query
|
||||||
`FOR doc IN collection RETURN doc`. The call expects a JSON object
|
`FOR doc IN collection RETURN doc`. The call expects a JSON object
|
||||||
as body with the following attributes:
|
as body with the following attributes:
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{PUT /_api/simple/any, Return a random document}
|
@RESTHEADER{PUT /_api/simple/any, Return a random document}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns a random document from a collection. The call expects a JSON object
|
Returns a random document from a collection. The call expects a JSON object
|
||||||
as body with the following attributes:
|
as body with the following attributes:
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ specified, this will default to true
|
||||||
An optional JSON object with arbitrary extra data about the user.
|
An optional JSON object with arbitrary extra data about the user.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Create a new user. You need server access level *Administrate* in order to
|
Create a new user. You need server access level *Administrate* in order to
|
||||||
execute this REST call.
|
execute this REST call.
|
||||||
|
|
||||||
|
@ -85,7 +84,6 @@ The name of the user.
|
||||||
The name of the database.
|
The name of the database.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Sets the database access levels for the database *dbname* of user *user*. You
|
Sets the database access levels for the database *dbname* of user *user*. You
|
||||||
need the *Administrate* server access level in order to execute this REST
|
need the *Administrate* server access level in order to execute this REST
|
||||||
call.
|
call.
|
||||||
|
@ -141,7 +139,6 @@ The name of the user.
|
||||||
The name of the database.
|
The name of the database.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Clears the database access level for the database *dbname* of user *user*. As
|
Clears the database access level for the database *dbname* of user *user*. As
|
||||||
consequence the default database access level is used. If there is no defined
|
consequence the default database access level is used. If there is no defined
|
||||||
default database access level, it defaults to *No access*. You need permission
|
default database access level, it defaults to *No access*. You need permission
|
||||||
|
@ -201,7 +198,6 @@ The name of the database.
|
||||||
The name of the collection.
|
The name of the collection.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Sets the collection access level for the *collection* in the database *dbname*
|
Sets the collection access level for the *collection* in the database *dbname*
|
||||||
for user *user*. You need the *Administrate* server access level in order to
|
for user *user*. You need the *Administrate* server access level in order to
|
||||||
execute this REST call.
|
execute this REST call.
|
||||||
|
@ -261,7 +257,6 @@ The name of the database.
|
||||||
The name of the collection.
|
The name of the collection.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Clears the collection access level for the collection *collection* in the
|
Clears the collection access level for the collection *collection* in the
|
||||||
database *dbname* of user *user*. As consequence the default collection
|
database *dbname* of user *user*. As consequence the default collection
|
||||||
access level is used. If there is no defined default collection access level,
|
access level is used. If there is no defined default collection access level,
|
||||||
|
@ -314,7 +309,6 @@ The name of the user for which you want to query the databases.
|
||||||
Return the full set of access levels for all databases and all collections.
|
Return the full set of access levels for all databases and all collections.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Fetch the list of databases available to the specified *user*. You need
|
Fetch the list of databases available to the specified *user*. You need
|
||||||
*Administrate* for the server access level in order to execute this REST call.
|
*Administrate* for the server access level in order to execute this REST call.
|
||||||
|
|
||||||
|
@ -393,7 +387,6 @@ The name of the user for which you want to query the databases.
|
||||||
The name of the database to query
|
The name of the database to query
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Fetch the database access level for a specific database
|
Fetch the database access level for a specific database
|
||||||
|
|
||||||
@RESTRETURNCODES
|
@RESTRETURNCODES
|
||||||
|
@ -449,7 +442,6 @@ The name of the database to query
|
||||||
The name of the collection
|
The name of the collection
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns the collection access level for a specific collection
|
Returns the collection access level for a specific collection
|
||||||
|
|
||||||
@RESTRETURNCODES
|
@RESTRETURNCODES
|
||||||
|
@ -510,7 +502,6 @@ specified, this will default to true
|
||||||
An optional JSON object with arbitrary extra data about the user.
|
An optional JSON object with arbitrary extra data about the user.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Replaces the data of an existing user. The name of an existing user must be
|
Replaces the data of an existing user. The name of an existing user must be
|
||||||
specified in *user*. You need server access level *Administrate* in order to
|
specified in *user*. You need server access level *Administrate* in order to
|
||||||
execute this REST call. Additionally, a user can change his/her own data.
|
execute this REST call. Additionally, a user can change his/her own data.
|
||||||
|
@ -576,7 +567,6 @@ specified, this will default to true
|
||||||
An optional JSON object with arbitrary extra data about the user.
|
An optional JSON object with arbitrary extra data about the user.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Partially updates the data of an existing user. The name of an existing user
|
Partially updates the data of an existing user. The name of an existing user
|
||||||
must be specified in *user*. You need server access level *Administrate* in
|
must be specified in *user*. You need server access level *Administrate* in
|
||||||
order to execute this REST call. Additionally, a user can change his/her own
|
order to execute this REST call. Additionally, a user can change his/her own
|
||||||
|
@ -634,7 +624,6 @@ The specified user does not exist
|
||||||
The name of the user
|
The name of the user
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Removes an existing user, identified by *user*. You need *Administrate* for
|
Removes an existing user, identified by *user*. You need *Administrate* for
|
||||||
the server access level in order to execute this REST call.
|
the server access level in order to execute this REST call.
|
||||||
|
|
||||||
|
@ -683,7 +672,6 @@ The specified user does not exist
|
||||||
The name of the user
|
The name of the user
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Fetches data about the specified user. You can fetch information about
|
Fetches data about the specified user. You can fetch information about
|
||||||
yourself or you need the *Administrate* server access level in order to
|
yourself or you need the *Administrate* server access level in order to
|
||||||
execute this REST call.
|
execute this REST call.
|
||||||
|
@ -729,7 +717,6 @@ The user with the specified name does not exist.
|
||||||
@RESTHEADER{GET /_api/user/, List available Users}
|
@RESTHEADER{GET /_api/user/, List available Users}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Fetches data about all users. You need the *Administrate* server access level
|
Fetches data about all users. You need the *Administrate* server access level
|
||||||
in order to execute this REST call. Otherwise, you will only get information
|
in order to execute this REST call. Otherwise, you will only get information
|
||||||
about yourself.
|
about yourself.
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
@RESTURLPARAMETERS
|
@RESTURLPARAMETERS
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
TBD
|
||||||
|
|
||||||
@RESTURLPARAM{view-name,string,required}
|
@RESTURLPARAM{view-name,string,required}
|
||||||
The name of the view.
|
The name of the view.
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{GET /_admin/wal/properties, Retrieves the configuration of the write-ahead log}
|
@RESTHEADER{GET /_admin/wal/properties, Retrieves the configuration of the write-ahead log}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Retrieves the configuration of the write-ahead log. The result is a JSON
|
Retrieves the configuration of the write-ahead log. The result is a JSON
|
||||||
object with the following attributes:
|
object with the following attributes:
|
||||||
- *allowOversizeEntries*: whether or not operations that are bigger than a
|
- *allowOversizeEntries*: whether or not operations that are bigger than a
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{GET /_admin/wal/transactions, Returns information about the currently running transactions}
|
@RESTHEADER{GET /_admin/wal/transactions, Returns information about the currently running transactions}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Returns information about the currently running transactions. The result
|
Returns information about the currently running transactions. The result
|
||||||
is a JSON object with the following attributes:
|
is a JSON object with the following attributes:
|
||||||
- *runningTransactions*: number of currently running transactions
|
- *runningTransactions*: number of currently running transactions
|
||||||
|
|
|
@ -18,7 +18,6 @@ long-running transactions and the write-ahead log garbage collector cannot
|
||||||
finish garbage collection.
|
finish garbage collection.
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Flushes the write-ahead log. By flushing the currently active write-ahead
|
Flushes the write-ahead log. By flushing the currently active write-ahead
|
||||||
logfile, the data in it can be transferred to collection journals and
|
logfile, the data in it can be transferred to collection journals and
|
||||||
datafiles. This is useful to ensure that all data for a collection is
|
datafiles. This is useful to ensure that all data for a collection is
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
@RESTHEADER{PUT /_admin/wal/properties, Configures the write-ahead log}
|
@RESTHEADER{PUT /_admin/wal/properties, Configures the write-ahead log}
|
||||||
|
|
||||||
@RESTDESCRIPTION
|
@RESTDESCRIPTION
|
||||||
|
|
||||||
Configures the behavior of the write-ahead log. The body of the request
|
Configures the behavior of the write-ahead log. The body of the request
|
||||||
must be a JSON object with the following attributes:
|
must be a JSON object with the following attributes:
|
||||||
- *allowOversizeEntries*: whether or not operations that are bigger than a
|
- *allowOversizeEntries*: whether or not operations that are bigger than a
|
||||||
|
|
|
@ -391,6 +391,7 @@ class Regexen:
|
||||||
self.RESTRETURNCODES = re.compile('.*@RESTRETURNCODES')
|
self.RESTRETURNCODES = re.compile('.*@RESTRETURNCODES')
|
||||||
self.RESTURLPARAM = re.compile('.*@RESTURLPARAM{')
|
self.RESTURLPARAM = re.compile('.*@RESTURLPARAM{')
|
||||||
self.RESTURLPARAMETERS = re.compile('.*@RESTURLPARAMETERS')
|
self.RESTURLPARAMETERS = re.compile('.*@RESTURLPARAMETERS')
|
||||||
|
self.TRIPLENEWLINEATSTART = re.compile('^\n\n\n')
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### @brief checks for end of comment
|
### @brief checks for end of comment
|
||||||
|
@ -864,10 +865,18 @@ def restqueryparam(cargo, r=Regexen()):
|
||||||
def restdescription(cargo, r=Regexen()):
|
def restdescription(cargo, r=Regexen()):
|
||||||
global swagger, operation, httpPath, method
|
global swagger, operation, httpPath, method
|
||||||
swagger['paths'][httpPath][method]['description'] += '\n\n'
|
swagger['paths'][httpPath][method]['description'] += '\n\n'
|
||||||
return generic_handler_desc(cargo, r, "restdescription", None,
|
|
||||||
|
ret = generic_handler_desc(cargo, r, "restdescription", None,
|
||||||
swagger['paths'][httpPath][method],
|
swagger['paths'][httpPath][method],
|
||||||
'description')
|
'description')
|
||||||
|
|
||||||
|
if r.TRIPLENEWLINEATSTART.match(swagger['paths'][httpPath][method]['description']):
|
||||||
|
(fp, last) = cargo
|
||||||
|
print >> sys.stderr, 'remove newline after @RESTDESCRIPTION in file %s' % (fp.name)
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
### @brief restreplybody
|
### @brief restreplybody
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in New Issue