Git Product home page Git Product logo

kiota-abstractions-ruby's Introduction

Kiota Abstractions Library for Ruby

Ruby

The Kiota abstractions Library for go is the go library defining the basic constructs Kiota projects need once an SDK has been generated from an OpenAPI definition.

A Kiota generated project will need a reference to the abstraction package to build and run.

Read more about Kiota here.

Using the abstractions library

Add this line to your application's Gemfile:

gem "microsoft_kiota_abstractions", "0.12.0"

And then execute:

bundle install

Or install it yourself as:

gem install microsoft_kiota_abstractions --version "0.12.0"

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

kiota-abstractions-ruby's People

Contributors

andreatp avatar andrueastman avatar baywet avatar dependabot[bot] avatar github-actions[bot] avatar microsoft-github-operations[bot] avatar microsoftopensource avatar ndiritu avatar

Stargazers

 avatar  avatar  avatar

Watchers

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

Forkers

andreatp

kiota-abstractions-ruby's Issues

Error when posting an object

/home/jasonjoh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/microsoft_kiota_abstractions-0.13.0/lib/microsoft_kiota_abstractions/request_information.rb:101:in set_content_from_parsable': undefined local variable or method this' for #<MicrosoftKiotaAbstractions::RequestInformation:0x00007feeaa6523e0 @headers=#<MicrosoftKiotaAbstractions::RequestHeaders:0x00007feeaa6523b8 @headers={"Accept"=>["application/json"], "Content-Type"=>["application/json"]}>, @query_parameters={}, @path_parameters={"baseurl"=>"https://jsonplaceholder.typicode.com"}, @url_template="{+baseurl}/posts{?userId*,title*}", @http_method=:POST> (NameError)

    this.content = writer.get_serialized_content();
    ^^^^

this.content = writer.get_serialized_content();

I believe this should be changed to:

@content = writer.get_serialized_content();

AnonymousAuthenticationProvider causes HTTP layer to throw error

auth_provider = MicrosoftKiotaAbstractions::AnonymousAuthenticationProvider.new()
request_adapter = MicrosoftKiotaFaraday::FaradayRequestAdapter.new(auth_provider)
client = Client::PostsClient.new(request_adapter)

all_posts = client.posts_by_id("5").get.resume

This results in the following error:

/home/jasonjoh/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/microsoft_kiota_faraday-0.11.0/lib/microsoft_kiota_faraday/faraday_request_adapter.rb:52:in `block in send_async': undefined method `resume' for nil:NilClass (NoMethodError)

        @authentication_provider.authenticate_request(request_info).resume

As a test, I modified anonymous_authentication_provider.rb, changing the authenticate_request to:

def authenticate_request(request)
  Fiber.new do
  end
end

And that resolved the error.

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.