cloudfoundry-attic / cf-swagger

Collection of Swagger descriptions and applications for CloudFoundry BOSH
Apache License 2.0
20 stars 8 forks source link

outdated cf service broker api 2.5 #5

Closed poblin-orange closed 7 years ago

poblin-orange commented 8 years ago

Latest cf service broker api is 2.8, introducing important feature as async sevice provisionning. This lag defaet the purpose of broker tck. Any plan for update ?

maximilien commented 7 years ago

Very true. We are open for contributions.

To motivate any work on this it would help if you commented here how you are or planned to use the description or TCK.

Best,

max

/cc @midoblgsm

davidfetter commented 7 years ago

At work, we're using Cloud Foundry pretty extensively. The good people in security and compliance would very much like us to provide up-to-date Swagger docs for their automated pen testing tools. It also wouldn't hurt for tooling that helps with CI/CD.

maximilien commented 7 years ago

@davidfetter which CloudFoundry service APIs? That is, the version?

davidfetter commented 7 years ago

I'm using the Service Broker API 2.10 with near-term plans to get to 2.11, but all of them would be good.

maximilien commented 7 years ago

OK I will try to get 2.11 done soon. Will update here when I have some version for you to test.

/cc @fehguy @davidfetter

davidfetter commented 7 years ago

Got an ETA?

maximilien commented 7 years ago

@davidfetter,

So I added some of the missing elements for v2.11. Look at commit a9b50dba4a7df16a424a95f5109b7c10ed5a7803

It's generating an error in Swagger editor that I am not sure how to fix:

✖ Swagger Error
Reference could not be resolved: #/parameters/last_operation
Jump to line 38
Details
 Object

I tried a couple of things but to no avail. I'll need to look into this soon when I have more time.

In mean time if you find a way to fix it then please submit a PR. Thx.

/cc @fehguy

fehguy commented 7 years ago

This is helpful. OK so...

First off, I just can't help but put it here:

https://app.swaggerhub.com/api/cf-demos/cf-broker/2.11

It's easier to collaborate on. I found the issue--the last_operation was actually missing from the definition. Note the reference on line 43 in swaggerhub and compare it to your file here:

https://github.com/cloudfoundry-incubator/cf-swagger/blob/a9b50dba4a7df16a424a95f5109b7c10ed5a7803/descriptions/cloudfoundry/service_broker/service_broker.json

So.. to resolve that, I added it to my copy of the definition. The description is missing and likely it's wrong, but this was my fix:

parameters:
  # this is missing!
  last_operation:
    name: last_operation
    in: path
    required: true
    type: string

With that, all seems groovy. Check the spec there when you can. Oh, I also removed some invalid JSON Schema syntax, such as those pesky siblings to the $ref object.

maximilien commented 7 years ago

Sweet, thanks @fehguy. I am copying over to this repo.

And will add this link: https://app.swaggerhub.com/api/cf-demos/cf-broker/2.11

@davidfetter, can you tell us if that new version from @fehguy worked for you. If not let me know and I will attempt pass #2.

maximilien commented 7 years ago

@fehguy separately, on Swagger Hub, I noticed the following error on top of editor:

build__collaborate___integrate_apis___swaggerhub

However, the hub still shows it at Valid? Any idea? Thx.

fehguy commented 7 years ago

Reload :) We just pushed a fix about 30 seconds ago.

davidfetter commented 7 years ago

I'm not clear as to what the whole service_broker.yaml file would look like. Is there a PR for this change?

maximilien commented 7 years ago

Hold on, I am pushing it now @davidfetter.

See commit: 964942a5078bfacabacf5372c81798ebbe0244fa

maximilien commented 7 years ago

Thanks @fehguy

davidfetter commented 7 years ago

Works for me.

maximilien commented 7 years ago

Sweet. I will do a release of cf-swagger since this is good update and I also added config-server.