8000 Doc - check for no new line after restdescription (#4883) · Sandychuang/arangodb@ffe11c6 · GitHub
[go: up one dir, main page]

Skip to content

Commit ffe11c6

Browse files
baslrsleto-it
authored andcommitted
Doc - check for no new line after restdescription (arangodb#4883)
1 parent 5fbb78f commit ffe11c6

23 files changed

+13
-34
lines changed

Documentation/DocuBlocks/Rest/AQL/delete_api_aqlfunction.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ the name of the AQL user function.
1919
qualified, including any namespaces. If none matches the *name*, HTTP 404 is returned.
2020

2121
@RESTDESCRIPTION
22-
2322
Removes an existing AQL user function or function group, identified by *name*.
2423

2524
@RESTRETURNCODES

Documentation/DocuBlocks/Rest/Administration/get_admin_database_version.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{GET /_admin/database/target-version, Return the required version of the database}
66

77
@RESTDESCRIPTION
8-
98
Returns the database-version that this server requires.
109
The version is returned in the *version* attribute of the result.
1110

Documentation/DocuBlocks/Rest/Administration/get_admin_routing_reloads.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{POST /_admin/routing/reload, Reloads the routing information}
66

77
@RESTDESCRIPTION
8-
98
Reloads the routing information from the collection *routing*.
109

1110
@RESTRETURNCODES

Documentation/DocuBlocks/Rest/Administration/get_admin_server_role.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{GET /_admin/server/role, Return role of a server in a cluster}
66

77
@RESTDESCRIPTION
8-
98
Returns the role of a server in a cluster.
109
The role is returned in the *role* attribute of the result.
1110
Possible return values for *role* are:

Documentation/DocuBlocks/Rest/Administration/get_admin_statistics.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{GET /_admin/statistics, Read the statistics}
66

77
@RESTDESCRIPTION
8-
98
Returns the statistics information. The returned object contains the
109
statistics figures grouped together according to the description returned by
1110
*_admin/statistics-description*. For instance, to access a figure *userTime*

Documentation/DocuBlocks/Rest/Administration/get_admin_statistics_description.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{GET /_admin/statistics-description, Statistics description}
66

77
@RESTDESCRIPTION
8-
98
Returns a description of the statistics returned by */_admin/statistics*.
109
The returned objects contains an array of statistics groups in the attribute
1110
*groups* and an array of statistics figures in the attribute *figures*.

Documentation/DocuBlocks/Rest/Administration/get_admin_time.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{GET /_admin/time, Return system time}
66

77
@RESTDESCRIPTION
8-
98
The call returns an object with the attribute *time*. This contains the
109
current system time as a Unix timestamp with microsecond precision.
1110

Documentation/DocuBlocks/Rest/Administration/get_api_cluster_endpoints.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
@RESTHEADER{GET /_api/cluster/endpoints, Get information about all coordinator endpoints}
55

66
@RESTDESCRIPTION
7-
87
Returns an object with an attribute `endpoints`, which contains an
98
array of objects, which each have the attribute `endpoint`, whose value
109
is a string with the endpoint description. There is an entry for each

Documentation/DocuBlocks/Rest/Administration/post_admin_execute.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
The body to be executed.
99

1010
@RESTDESCRIPTION
11-
1211
Executes the javascript code in the body on the server as the body
1312
of a function with no arguments. If you have a *return* statement
1413
then the return value you produce will be returned as content type

Documentation/DocuBlocks/Rest/Cluster/get_cluster_statistics.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
@RESTQUERYPARAM{DBserver,string,required}
1010

11-
@RESTDESCRIPTION Queries the statistics of the given DBserver
11+
@RESTDESCRIPTION
12+
Queries the statistics of the given DBserver
1213

1314
@RESTRETURNCODES
1415

Documentation/DocuBlocks/Rest/Cursors/post_api_cursor_identifier.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
The name of the cursor
1111

1212
@RESTDESCRIPTION
13-
1413
If the cursor is still alive, returns an object with the following
1514
attributes:
1615

Documentation/DocuBlocks/Rest/Indexes/get_api_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
The collection name.
1111

1212
@RESTDESCRIPTION
13-
1413
Returns an object with an attribute *indexes* containing an array of all
1514
index descriptions for the given collection. The same information is also
1615
available in the *identifiers* as an object with the index handles as

Documentation/DocuBlocks/Rest/Indexes/get_api_reads_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
The index-handle.
1111

1212
@RESTDESCRIPTION
13-
1413
The result is an object describing the index. It has at least the following
1514
attributes:
1615

Documentation/DocuBlocks/Rest/Indexes/post_api_index_delete.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
The index handle.
1111

1212
@RESTDESCRIPTION
13-
1413
Deletes an index with *index-handle*.
1514

1615
@RESTRETURNCODES

Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_all.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
Contains the query.
99

1010
@RESTDESCRIPTION
11-
1211
Returns all documents of a collections. Equivalent to the AQL query
1312
`FOR doc IN collection RETURN doc`. The call expects a JSON object
1413
as body with the following attributes:

Documentation/DocuBlocks/Rest/Simple Queries/put_api_simple_any.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{PUT /_api/simple/any, Return a random document}
66

77
@RESTDESCRIPTION
8-
98
Returns a random document from a collection. The call expects a JSON object
109
as body with the following attributes:
1110

Documentation/DocuBlocks/Rest/User Management/README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ specified, this will default to true
2323
An optional JSON object with arbitrary extra data about the user.
2424

2525
@RESTDESCRIPTION
26-
2726
Create a new user. You need server access level *Administrate* in order to
2827
execute this REST call.
2928

@@ -85,7 +84,6 @@ The name of the user.
8584
The name of the database.
8685

8786
@RESTDESCRIPTION
88-
8987
Sets the database access levels for the database *dbname* of user *user*. You
9088
need the *Administrate* server access level in order to execute this REST
9189
call.
@@ -141,7 +139,6 @@ The name of the user.
141139
The name of the database.
142140

143141
@RESTDESCRIPTION
144-
145142
Clears the database access level for the database *dbname* of user *user*. As
146143
consequence the default database access level is used. If there is no defined
147144
default database access level, it defaults to *No access*. You need permission
@@ -201,7 +198,6 @@ The name of the database.
201198
The name of the collection.
202199

203200
@RESTDESCRIPTION
204-
205201
Sets the collection access level for the *collection* in the database *dbname*
206202
for user *user*. You need the *Administrate* server access level in order to
207203
execute this REST call.
@@ -261,7 +257,6 @@ The name of the database.
261257
The name of the collection.
262258

263259
@RESTDESCRIPTION
264-
265260
Clears the collection access level for the collection *collection* in the
266261
database *dbname* of user *user*. As consequence the default collection
267262
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.
314309
Return the full set of access levels for all databases and all collections.
315310

316311
@RESTDESCRIPTION
317-
318312
Fetch the list of databases available to the specified *user*. You need
319313
*Administrate* for the server access level in order to execute this REST call.
320314

@@ -393,7 +387,6 @@ The name of the user for which you want to query the databases.
393387
The name of the database to query
394388

395389
@RESTDESCRIPTION
396-
397390
Fetch the database access level for a specific database
398391

399392
@RESTRETURNCODES
@@ -449,7 +442,6 @@ The name of the database to query
449442
The name of the collection
450443

451444
@RESTDESCRIPTION
452-
453445
Returns the collection access level for a specific collection
454446

455447
@RESTRETURNCODES
@@ -510,7 +502,6 @@ specified, this will default to true
510502
An optional JSON object with arbitrary extra data about the user.
511503

512504
@RESTDESCRIPTION
513-
514505
Replaces the data of an existing user. The name of an existing user must be
515506
specified in *user*. You need server access level *Administrate* in order to
516507
execute this REST call. Additionally, a user can change his/her own data.
@@ -576,7 +567,6 @@ specified, this will default to true
576567
An optional JSON object with arbitrary extra data about the user.
577568

578569
@RESTDESCRIPTION
579-
580570
Partially updates the data of an existing user. The name of an existing user
581571
must be specified in *user*. You need server access level *Administrate* in
582572
order to execute this REST call. Additionally, a user can change his/her own
@@ -634,7 +624,6 @@ The specified user does not exist
634624
The name of the user
635625

636626
@RESTDESCRIPTION
637-
638627
Removes an existing user, identified by *user*. You need *Administrate* for
639628
the server access level in order to execute this REST call.
640629

@@ -683,7 +672,6 @@ The specified user does not exist
683672
The name of the user
684673

685674
@RESTDESCRIPTION
686-
687675
Fetches data about the specified user. You can fetch information about
688676
yourself or you need the *Administrate* server access level in order to
689677
execute this REST call.
@@ -729,7 +717,6 @@ The user with the specified name does not exist.
729717
@RESTHEADER{GET /_api/user/, List available Users}
730718

731719
@RESTDESCRIPTION
732-
733720
Fetches data about all users. You need the *Administrate* server access level
734721
in order to execute this REST call. Otherwise, you will only get information
735722
about yourself.

Documentation/DocuBlocks/Rest/Views/get_api_view_properties.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
@RESTURLPARAMETERS
88

99
@RESTDESCRIPTION
10+
TBD
1011

1112
@RESTURLPARAM{view-name,string,required}
1213
The name of the view.

Documentation/DocuBlocks/Rest/wal/get_admin_wal_properties.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{GET /_admin/wal/properties, Retrieves the configuration of the write-ahead log}
66

77
@RESTDESCRIPTION
8-
98
Retrieves the configuration of the write-ahead log. The result is a JSON
109
object with the following attributes:
1110
- *allowOversizeEntries*: whether or not operations that are bigger than a

Documentation/DocuBlocks/Rest/wal/get_admin_wal_transactions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{GET /_admin/wal/transactions, Returns information about the currently running transactions}
66

77
@RESTDESCRIPTION
8-
98
Returns information about the currently running transactions. The result
109
is a JSON object with the following attributes:
1110
- *runningTransactions*: number of currently running transactions

Documentation/DocuBlocks/Rest/wal/put_admin_wal_flush.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ long-running transactions and the write-ahead log garbage collector cannot
1818
finish garbage collection.
1919

2020
@RESTDESCRIPTION
21-
2221
Flushes the write-ahead log. By flushing the currently active write-ahead
2322
logfile, the data in it can be transferred to collection journals and
2423
datafiles. This is useful to ensure that all data for a collection is

Documentation/DocuBlocks/Rest/wal/put_admin_wal_properties.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@RESTHEADER{PUT /_admin/wal/properties, Configures the write-ahead log}
66

77
@RESTDESCRIPTION
8-
98
Configures the behavior of the write-ahead log. The body of the request
109
must be a JSON object with the following attributes:
1110
- *allowOversizeEntries*: whether or not operations that are bigger than a

utils/generateSwagger.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ def __init__(self):
391391
self.RESTRETURNCODES = re.compile('.*@RESTRETURNCODES')
392392
self.RESTURLPARAM = re.compile('.*@RESTURLPARAM{')
393393
self.RESTURLPARAMETERS = re.compile('.*@RESTURLPARAMETERS')
394+
self.TRIPLENEWLINEATSTART = re.compile('^\n\n\n')
394395

395396
################################################################################
396397
### @brief checks for end of comment
@@ -864,10 +865,18 @@ def restqueryparam(cargo, r=Regexen()):
864865
def restdescription(cargo, r=Regexen()):
865866
global swagger, operation, httpPath, method
866867
swagger['paths'][httpPath][method]['description'] += '\n\n'
867-
return generic_handler_desc(cargo, r, "restdescription", None,
868+
869+
ret = generic_handler_desc(cargo, r, "restdescription", None,
868870
swagger['paths'][httpPath][method],
869871
'description')
870872

873+
if r.TRIPLENEWLINEATSTART.match(swagger['paths'][httpPath][method]['description']):
874+
(fp, last) = cargo
875+
print >> sys.stderr, 'remove newline after @RESTDESCRIPTION in file %s' % (fp.name)
876+
exit(1)
877+
878+
return ret
879+
871880
################################################################################
872881
### @brief restreplybody
873882
################################################################################

0 commit comments

Comments
 (0)
0