Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Generator] Rust API client/server generator #6613

Merged
merged 43 commits into from
Oct 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7c9a35d
Rust API client/server generator
mirw Aug 22, 2017
1aca4b8
`Future::boxed()` has been deprecated - replace with `Box::new(...)`
johnbatty Aug 24, 2017
d44dfbe
rebasing to rust
Aug 23, 2017
f50ba83
MMMLS211 use empty vec over none
Aug 21, 2017
44415c6
MMMLS211 rebuild after merge from rust
Aug 21, 2017
3e48853
MMMLS211 YAML array examples not wrapped in Some()
Aug 21, 2017
ff4ede7
MMMLS211 Array parameters bad mustache fix
Aug 21, 2017
d14ec3b
MMMLS211 don't parse map containers
Aug 24, 2017
5f4fef5
MMMLS211 Tidy container types
Aug 24, 2017
2c73516
MMMLS-211 rebuild example
Aug 24, 2017
a172c46
MMMLS211 mvn rebuild
Aug 24, 2017
80ec0ea
Percent-decode parameters contained in the path
NigelThorpe Aug 25, 2017
faf4717
Produce warnings when unknown fields are present
Aug 25, 2017
d60055b
Markup
Aug 25, 2017
271aeda
MMMLS211: Make optional arrays Options again
Aug 29, 2017
c15c150
211 markups
Sep 1, 2017
7f38ce0
Temporary attempt at tweaking Cow ownership tweak while merging chang…
NigelThorpe Sep 4, 2017
ab66b92
Remove to_string call while parsing path parameters, which requires d…
NigelThorpe Sep 4, 2017
58ad4ff
Fix rustfmt to the correct version
NigelThorpe Sep 4, 2017
f5098d8
Fix rustfmt to the correct version
NigelThorpe Sep 4, 2017
92a3579
Add more response information to ApiError in client
Sep 6, 2017
10492b7
Re-add missing brace
Sep 6, 2017
6efc88f
Code review markups
Sep 6, 2017
51fd2fc
Allow converting out of wrapper types
bossmc Sep 6, 2017
a05bcc4
Store arrays in new-types too
bossmc Sep 6, 2017
3491516
Use a new hyper_client every request
bossmc Sep 3, 2017
3cc0152
Add vec-like traits to array types
bossmc Sep 8, 2017
4f374d9
Xml support - new branch
oa-metaswitch Sep 19, 2017
051f289
Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs…
oa-metaswitch Sep 20, 2017
6fb1a64
MMSUB-172 Don't set Content-Type when there's no body.
kw217 Sep 25, 2017
6a6a0fd
MMSUB-172 Move to swagger 0.6.
kw217 Sep 25, 2017
6eced15
Merge remote-tracking branch 'origin/master' into rust
mirw Sep 26, 2017
196232e
Manually implement debug for the client
alango Sep 26, 2017
f6f7d34
Allow `Context` to be bound to `Api`, and not passed on every functio…
mirw Oct 2, 2017
2082eaa
Support "." in parameter names
Oct 6, 2017
5604275
Support generate's "--reserved-words-mappings" option
Oct 6, 2017
423559f
Support "." in parameter names
Oct 6, 2017
c109b88
Support generate's "--reserved-words-mappings" option
Oct 6, 2017
e2144a4
Merge remote-tracking branch 'upstream/master' into github-rust
Oct 11, 2017
472e39a
Merge pull request #2 from bruceadams/cli-reserved-words-mappings
Oct 11, 2017
a648901
Merge pull request #1 from bruceadams/dot-in-params
Oct 11, 2017
c8e7f34
Merge branch 'master' into rust
wing328 Oct 18, 2017
362f3ce
Merge branch 'master' into rust
wing328 Oct 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ Here is a list of template creators:
* PowerShell: @beatcracker
* R: @ramnov
* Rust: @farcaller
* Rust (rust-server): @metaswitch
* Scala (scalaz & http4s): @tbrown1979
* Swift: @tkqubo
* Swift 3: @hexelon
Expand Down Expand Up @@ -1018,6 +1019,7 @@ Here is a list of template creators:
* PHP Symfony: @ksm2
* PHP Zend Expressive (with Path Handler): @Articus
* Ruby on Rails 5: @zlx
* Rust (rust-server): @metaswitch
* Scala Finch: @jimschubert
* Documentation
* HTML Doc 2: @jhitchcock
Expand Down
31 changes: 31 additions & 0 deletions bin/rust2-petstore.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

SCRIPT="$0"

while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done

if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DIR}"; pwd`
fi

executable="./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar"

if [ ! -f "$executable" ]
then
mvn clean package
fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -t modules/swagger-codegen/src/main/resources/rust2 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l rust2 -o samples/client/petstore/rust2 -DpackageName=petstore_api"

java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import io.swagger.models.ExternalDocs;


public class CodegenModel {
public String parent, parentSchema;
public List<String> interfaces;
Expand Down
Loading