mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Fix openapi docs generation
esprima-python is now safe to use
(https://github.com/Kronuz/esprima-python/pull/12)
And there was a new ArrowFunctionExpression used in db666eec65
that broke the python script
This commit is contained in:
parent
be22ca332b
commit
2c1f40357d
4 changed files with 21512 additions and 6 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/env python3
|
#!/bin/env python3
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import esprima
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
@ -14,7 +15,7 @@ err_context = 3
|
||||||
|
|
||||||
|
|
||||||
def get_req_body_elems(obj, elems):
|
def get_req_body_elems(obj, elems):
|
||||||
if obj.type == 'FunctionExpression':
|
if obj.type in ['FunctionExpression', 'ArrowFunctionExpression']:
|
||||||
get_req_body_elems(obj.body, elems)
|
get_req_body_elems(obj.body, elems)
|
||||||
elif obj.type == 'BlockStatement':
|
elif obj.type == 'BlockStatement':
|
||||||
for s in obj.body:
|
for s in obj.body:
|
||||||
|
|
|
||||||
17864
public/api/wekan.html
17864
public/api/wekan.html
File diff suppressed because it is too large
Load diff
3646
public/api/wekan.yml
3646
public/api/wekan.yml
File diff suppressed because it is too large
Load diff
|
|
@ -4,6 +4,11 @@
|
||||||
sudo apt-get install python3-pip
|
sudo apt-get install python3-pip
|
||||||
sudo pip3 install -U setuptools wheel
|
sudo pip3 install -U setuptools wheel
|
||||||
sudo npm install -g api2html
|
sudo npm install -g api2html
|
||||||
|
mkdir -p ~/python
|
||||||
|
cd ~/python
|
||||||
|
git clone --depth 1 -b master https://github.com/Kronuz/esprima-python
|
||||||
|
cd ~/python/esprima-python
|
||||||
|
sudo python3 setup.py install --record files.txt
|
||||||
cd ~/repos/wekan
|
cd ~/repos/wekan
|
||||||
mkdir -p public/api
|
mkdir -p public/api
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue