Commit Graph

444 Commits

Author SHA1 Message Date
Sebastian Thiel
043f3752e6 basic python 3 port, nearly works 2021-01-05 23:24:57 +08:00
Sebastian Thiel
301f140c83 Basic fixups for python3 2021-01-05 23:02:51 +08:00
Sebastian Thiel
c949124df5 Bump patch level to prep for release 2020-07-10 09:13:01 +08:00
Joel Lathrop
6ad88cb773 Fix '-force' target generation for JSON schemata.
In some environments, a variable-existence test in a template was
yielding a false negative which resulted in the template not generating
'-force' targets for API JSON files, even when the `FETCH_APIS`
environment variable was set during template rendering.

This commit adjusts the way the test for the variable presence is done
such that the '-force' targets now render when they should.
2020-07-09 09:09:51 +08:00
Sebastian Thiel
5e5327f3f7 Use api overrides to specialize building of drive2/3 APIs
This seems preferable over hardcoding special knowledge into the
generator code.
2020-06-05 11:11:17 +08:00
Sebastian Thiel
e06c7c67e0 Avoid talking to google each time dependencies are built…
…which doesn't work very well in certain geographical locations.
This can be triggered using by setting FETCH_API to a value, like

`FETCH_APIS=1 make`
2020-06-05 11:00:24 +08:00
Dennis Vestergaard Værum
041f8951e3 Added the doit_without_upload function to the code generator 2020-06-03 00:33:21 +02:00
Björn Weinehall
6ed8df5f96 Extend attempted error message parsing to also cover ErrorResponse
objects. Fixes errors in e.g. drive3 api not getting passed to delegate
error handlers.
2020-05-29 19:43:50 +08:00
Sebastian Thiel
8e9ce08aa2 Fix typo: enocodable -> encodable
Fixes #250
2020-04-14 08:51:19 +08:00
Sebastian Thiel
65b8f0063d Rewrite deprecated features, such as try!
As taken from
https://github.com/Byron/google-apis-rs/pull/247
2020-01-18 14:46:53 +08:00
Sebastian Thiel
f350baa4a7 Fix unit tests 2020-01-18 14:14:07 +08:00
Tyler Hawkes
f7ac5ebe36 Expose features from yup-oauth2 2019-08-29 10:31:21 +02:00
Sebastian Thiel
5b370e4190 Align CLI generator with changes in string type handling
There was some duplicated logic here.
2019-07-05 18:39:18 +08:00
Sebastian Thiel
4ceeac6320 And once again, python string handling bit me...
...so sick of it. No python, ever again.
Why, but why did I chose Mako back then :D?
2019-07-05 17:26:22 +08:00
Sebastian Thiel
f33fae47e9 Add Rust preprocessor to handle code examples gracefully
Fixes #213
2019-07-05 17:00:56 +08:00
Sebastian Thiel
24b5faa417 Omit special case for type inference; fixes #180 2019-07-05 11:57:05 +08:00
Sebastian Thiel
99e97ceece Assure API descriptions can contain '"' characters 2019-07-05 11:16:57 +08:00
Sebastian Thiel
25ba809a09 Support types with '-' 2019-07-05 10:44:24 +08:00
Sebastian Thiel
7a44b3eae1 Unconditionally re-export everything in cmn.rs
Related to #218
2019-07-05 10:17:03 +08:00
Sebastian Thiel
a5135985d2 Assure makefile dependency generation doesn't fail if a JSON file doesn't exist locally
For some reason, 'docs-v1' JSON file wasn't present in the repo, and
thus makefile couldn't be generated from scratch.

Now we just ignore this particular error.
2019-07-05 09:47:45 +08:00
Amy K
a2f5625fe3 docs: add lang attribute to docs index
Use the W3 standard "lang" attribute on the "html" tag to provide context for browsers and screen
readers.
2019-07-03 18:27:55 +08:00
Guy Taylor
7467f81594 Sort JSON files to minimise git diffs
Sort and format JSON files to remove/minimise any diffs between
update-json runs. This also acts as a JSON validator to error when the
downloaded JSON file has been truncated.
2019-07-03 18:21:35 +08:00
Guy Taylor
93dba234dd Add logging and switch to curl
I am getting many truncated JSON file that then do not parse. More from
wget to curl to see if this helps.
2019-07-03 18:21:35 +08:00
Guy Taylor
57a7ee37e5 Always run Python in the Venv context 2018-12-21 13:05:40 +01:00
gheoan
43b953445e docs(mako): fix typo 2018-12-21 13:00:04 +01:00
Guy Taylor
4faa5f6203 Add first type inferance tests
This slightly changes to code under test by:
* Adding __init__.py files to create modules
* Converts for a.b to a['b'] to allow object or dict types
2018-10-28 11:39:29 +01:00
Guy Taylor
a793af5586 Make utils.method_params private as it is not used.
This removed it been improted into Mako templates and renames it
_method_params to make it clear.
2018-10-28 11:39:29 +01:00
Guy Taylor
9867b260e1 Improve Python testing
Introduce pytest, wire it into Make and convert previous tests.

Note this is not wired into Travis
2018-10-21 22:37:39 +01:00
Sebastian Thiel
0360e61c27 Merge branch 'update_url_to_1_7_1' of https://github.com/edelangh/google-apis-rs into edelangh-update_url_to_1_7_1 2018-10-21 12:08:26 +02:00
edelangh
0403e19476 Update dep url to 1.7.1 2018-10-16 23:52:34 +02:00
Sebastian Thiel
255c7f5ad5 Update to latest versions of API declarations 2018-10-13 13:49:14 +02:00
Sebastian Thiel
5a67475b54 Merge branch 'photoslibrary' of https://github.com/TheBiggerGuy/google-apis-rs into TheBiggerGuy-photoslibrary 2018-10-13 12:16:10 +02:00
Guy Taylor
d202f9792b ichore(blacklist): blacklist versions that do not exist 2018-10-13 11:49:16 +02:00
Guy Taylor
38f086ebb5 chore(gen): clean up after failed wget
Wget leaves empty files when getting a 404. This causes JSON parse errors later on instead of the expected file not found message.
2018-10-13 11:49:16 +02:00
Bryan Burgers
7a041ecf2d docs(LIB): Add dependencies to README
In the section that describes setting up the Cargo.toml, add the
required dependencies, and note that `hyper` and `hyper-rustls` are not
the latest versions. This helps new users get started quicker and
easier.
2018-10-13 11:47:34 +02:00
Guy Taylor
4603769ca6 chore(manually_added): Add support for adding unlisted APIs
The photoslibrary API is not listed however is still available.
This adds a method of manually adding APIs to the shared.yaml and adds the photoslibary API info.

Fixes #198
2018-10-11 19:55:53 +01:00
Faddi
d042fcf1a7 fix(util.py): iteration over dicts with 'values' key
Sheets api has a 'values' key in resources.spreadsheets.resources which
collides with values().
2018-01-28 16:54:05 +01:00
Sebastian Thiel
c28413321b Switch to serde to v1.0 2017-09-24 14:51:51 +02:00
Cristi Cobzarenco
f835835100 fix(mbuild): strip leading slashes from urls 2017-08-27 09:57:50 +02:00
Sebastian Thiel
a630af5830 First step towards allowing scopes to be deactivated entirely
This is backwards compatible, but allows `add_scope(None)` as well.
Maybe it's better to just add another function, but on the other hand,
this would already do and solves that somewhat more special case.

Related to #172
2017-06-28 09:15:57 +02:00
Sebastian Thiel
4660d23676 fix(docs): Example now uses hyper_rustls
It's already done by the CLI, but the docs still showed
code that would only work in older hyper versions that still
shipped with HTTPS.

Fixes #169
2017-05-26 10:14:39 +02:00
Sebastian Thiel
dd4bfe3de0 fix(lib): more idiomatic swapping of values 2017-05-22 20:57:24 +02:00
Christian Legnitto
9ffa241f37 feat(hub): Allow overriding rootUrl and baseUrl
Allow the hub to override `rootUrl` and `baseUrl` for the service.
This is useful for pointing at localhost for testing or a proxy.
2017-05-06 17:59:05 -07:00
Michael-F-Bryan
ef070eef59 fix(index.html.mako): Added an assert to detect when docs need updating 2017-04-01 21:48:37 +08:00
Michael-F-Bryan
de6528be98 fix(index.html.mako): Finished adjustments to index.html template (fixes #166)
Summary of changes:

- Converted from using span + br tags for formatting to using tables
- Added Bootstrap stylesheet
- Refactored a lot of the logic which was being done in the html ${...}
  tags out into a block which gets run at the start of each api version.
  (hopefully this will make the template easier to maintain in the long
  run)

Possible issue:

I swapped from looping over each key in `tc.keys()` to assuming the keys
will only ever be ["api", "cli"]. This hard codes the keys instead of
getting them dynamically, but makes it easier to format as a table and
lets you pull a lot of the logic out of the template and into a single
block before each table row.

If the types of application in `tc.keys()` ever changes then this
template will need to be updated accordingly!
2017-04-01 02:55:11 +08:00
Michael-F-Bryan
5bc4141fa5 style(index.html.mako): Fixed up indenting and line length 2017-04-01 02:37:29 +08:00
Michael-F-Bryan
0d655411ab refactor(index.html.mako): Added bootstrap to make things pretty 2017-04-01 02:27:37 +08:00
Michael-F-Bryan
05b442d589 refactor(index.html.mako): Cleaned up a lot of the link logic 2017-04-01 02:20:29 +08:00
Michael-F-Bryan
8934365401 refactor(index.html.mako): Converted data to a table 2017-04-01 02:03:26 +08:00
Michael-F-Bryan
09ce891eeb refactor(index.html.mako) Renamed a couple variables 2017-04-01 01:48:29 +08:00