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
reviewable/pr3672/r1
Benjamin Tissoires 4 years ago
parent be22ca332b
commit 2c1f40357d
  1. 3
      openapi/generate_openapi.py
  2. 18728
      public/api/wekan.html
  3. 3646
      public/api/wekan.yml
  4. 5
      releases/rebuild-docs-install-deps.sh

@ -1,6 +1,7 @@
#!/bin/env python3
import argparse
import esprima
import json
import logging
import os
@ -14,7 +15,7 @@ err_context = 3
def get_req_body_elems(obj, elems):
if obj.type == 'FunctionExpression':
if obj.type in ['FunctionExpression', 'ArrowFunctionExpression']:
get_req_body_elems(obj.body, elems)
elif obj.type == 'BlockStatement':
for s in obj.body:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -4,6 +4,11 @@
sudo apt-get install python3-pip
sudo pip3 install -U setuptools wheel
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
mkdir -p public/api

Loading…
Cancel
Save