Code Monkey home page Code Monkey logo

language-templates's People

Contributors

abtris avatar almad avatar andreineculau avatar arkbuilder avatar fosrias avatar gr2m avatar honzajavorek avatar kfrancis avatar kuba-kubula avatar kylef avatar mamund avatar nestorpina avatar pksunkara avatar zdne avatar zzen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

language-templates's Issues

Invalid code sample URLs when using multiple parameters & pct-encoding

When there are multiple parameters in a Resource URI, and at least one with a pct-encoded character the rendered code sample show incorrect URL.

Consider following blueprint:

Request URL renders fine with:

# /notes{?foo%2Ebar}
### POST
+ Response 201 (application/json)

Appending one additional query parameter, let's say a results into incorrect URL in the example. Compare (correct):

screen shot 2015-02-01 at 9 30 09 pm

With incorrect:

screen shot 2015-02-01 at 9 29 54 pm

Also

The downstream effect here is that the incorrect URI is sent to the API server so the response is malformatted creating an error.

Originally reported at SO

Python examples should also support Python 3

The current Python example implementation leverages Python 2 libraries, do you have plans to add Python 3 examples? Python 2 is now legacy and the examples can no longer be used as is.

perl template generates code with syntax errors and quoting issues

JSON objects translated to Perl hash references use : as the separator instead of , or =>, which causes syntax errors.

There can be unbalanced braces in generated code, which causes syntax errors.

JSON containing embedded newlines is single quoted, which double escapes the newlines, causing literal \n characters to appear in embarrassing places. This can be avoided by using qq'...' or regular double quotes instead of single quotes, however that will trigger Perl's string interpolation on the entire string, so it might be necessary to only double quote the newlines:

my $hr = {
  'abc' => 'def' ."\n". 'ghi',
};

In order to see this in action, head over to the SparkPost API docs, click the < on the black background near the top right hand corner, click Create Transmission with Inline Parts Content, and scroll down to select Perl from the language dropdown.

C# example code results in undefined

The request Uri for the C# example code is broken for all samples, instead of the relative url the samples display "undefined"

From the sample (http://docs.pollsapi.apiary.io/):

using (var response = await httpClient.PostAsync("undefined", content))
{
    string responseData = await response.Content.ReadAsStringAsync();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.