Giter VIP home page Giter VIP logo

cloudsmith-api's People

Contributors

apoclyps avatar chrisimcevoy avatar csm-api-bot avatar davids-cloud avatar dkatavic avatar dmeecs avatar jackgibson1 avatar leeoc avatar lskillen avatar mrtam avatar paddycarey avatar

Stargazers

 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

cloudsmith-api's Issues

Ruby bindings are not compatible with Ruby 3.0

The ruby bindings make use of the URI.encode method which was deprecated in Ruby 2.5 and has been removed in Ruby 3.0

This causes an issue when we attempt to make any API call with the Cloudsmith-API gem.

This appears to have been addressed in swagger-codegen in swagger-api/swagger-codegen#10445

I've validated this with the following minimal reproduction:

> ruby --version
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux]

> gem info cloudsmith-api

*** LOCAL GEMS ***

cloudsmith-api (0.57.1)
    Author: Cloudsmith Ltd
    Homepage: https://api.cloudsmith.io/?format=openapi
    License: Apache-2.0
    Installed at: /home/ryan/.bundle/cloudsmith-example

    Cloudsmith API

> cat cloudsmith-example.rb
require 'cloudsmith-api'

CloudsmithApi.configure do |config|
  config.api_key['X-Api-Key'] = 'my-example-api-key'
end

CloudsmithApi::PackagesApi.new.packages_list(
  "example-organization",
  "gems",
  query: "name:example"
)

> ruby cloudsmith-example.rb
/home/ryan/.bundle/cloudsmith-example/gems/cloudsmith-api-0.57.1/lib/cloudsmith-api/configuration.rb:178:in `base_url': undefined method `encode' for URI:Module (NoMethodError)
        from /home/ryan/.bundle/cloudsmith-example/gems/cloudsmith-api-0.57.1/lib/cloudsmith-api/api_client.rb:267:in `build_request_url'
        from /home/ryan/.bundle/cloudsmith-example/gems/cloudsmith-api-0.57.1/lib/cloudsmith-api/api_client.rb:90:in `build_request'
        from /home/ryan/.bundle/cloudsmith-example/gems/cloudsmith-api-0.57.1/lib/cloudsmith-api/api_client.rb:50:in `call_api'
        from /home/ryan/.bundle/cloudsmith-example/gems/cloudsmith-api-0.57.1/lib/cloudsmith-api/api/packages_api.rb:205:in `packages_list_with_http_info'
        from /home/ryan/.bundle/cloudsmith-example/gems/cloudsmith-api-0.57.1/lib/cloudsmith-api/api/packages_api.rb:162:in `packages_list'
        from cloudsmith-example.rb:7:in `<main>'

Response from V2 server protocol Api does not have `count` property implemented

Hi, we're from the Microsoft.PowerShell.PSResourceGet (previously PowerShellGet) team which is a package manager tool that supports searching, installing and publishing to different repositories with V2 and V3 server protocol support.

We had a user using the V2 endpoint for their repository (https://nuget.cloudsmith.io/repopsresourceget/test/v2) but search fails with our tool because our query uses the $inlinecount=allpages parameter, like so:

https://nuget.cloudsmith.io/repopsresourceget/test/v2/FindPackagesById()?id='Depends'&$inlinecount=allpages&$filter=IsLatestVersion and Id eq 'Depends'

However the response returned from this query shows that the count property is not yet implemented:
image

Just wanted to ask if there's any plans to implement this? Or would you recommend that users use V3 server protocol endpoint instead? For more context on the issue reported to us, here's the link.

Documentation on Status API is missing an enum entry for `indicator = maintenance`

(Warning: I suspect this is the wrong repository for this issue report)

Currently if I hit api/v2/status.json, I get

curl --silent 'https://status.cloudsmith.io/api/v2/status.json' | jq
{
  "page": {
    "id": "yt0blqw1vlv7",
    "name": "Cloudsmith",
    "url": "https://status.cloudsmith.io",
    "time_zone": "Etc/UTC",
    "updated_at": "2022-01-08T15:49:00.027Z"
  },
  "status": {
    "indicator": "maintenance",
    "description": "Service Under Maintenance"
  }
}

If I read the documentation at
https://status.cloudsmith.io/api/v2
it says

This endpoint includes an indicator - one of none, minor, major, or critical

maintenance is not mentioned.

Entitlements API - need to add support for show_tokens to the sync cmd

It currently breaks the CLI (which has support for show_tokens) on the sync command

 cloudsmith ents sync acarson/repo_abc repo_def -F json -y Syncing entitlements from the integration repository to the test repositoryTraceback (most recent call last): File "/usr/local/bin/cloudsmith", line 11, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/cloudsmith_cli/cli/commands/entitlements.py", line 35, in wrapper return ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/cloudsmith_cli/cli/decorators.py", line 66, in wrapper return ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/cloudsmith_cli/cli/decorators.py", line 92, in wrapper return ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/cloudsmith_cli/cli/decorators.py", line 128, in wrapper return ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/cloudsmith_cli/cli/decorators.py", line 183, in wrapper return ctx.invoke(f, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/cloudsmith_cli/cli/commands/entitlements.py", line 470, in sync owner=owner, repo=repo, source=source, show_tokens=show_tokens File "/usr/local/lib/python2.7/dist-packages/cloudsmith_cli/core/api/entitlements.py", line 124, in sync_entitlements show_tokens=show_tokens File "/usr/local/lib/python2.7/dist-packages/cloudsmith_api/apis/entitlements_api.py", line 1150, in entitlements_sync_with_http_info " to method entitlements_sync" % key TypeError: Got an unexpected keyword argument 'show_tokens' to method entitlements_sync

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.