ProxyApi icon indicating copy to clipboard operation
ProxyApi copied to clipboard

New functionality added

Open faniereynders opened this issue 11 years ago • 9 comments

Added functionality to get the meta-data from the service by passing a special "X-Proxy-ResponseType" header to the proxies endpoint (/api/proxies) with a value either for JavaScript ("js") or service meta-data ("metadata").

Created a build task that will be shipped as a seperate NuGet package to generate C# code from the metadata provided from the proxies endpoint.

faniereynders avatar Jan 13 '14 02:01 faniereynders

Hey @faniereynders, I'm trying to get this building and it looks like a bunch of files are missing from source control:

  • CSharpProxyTemplate
  • JSProxyTemplate.Parameters
  • Almost everything under ProxyApi.MetadataGenerator/Models

Is this building for you as it stands?

Also, I'm not sure about a couple of usage details here. I think we might need to review how we want this to be used as well.

If you can sort out the build problems above then we can start looking at getting this merged

stevegreatrex avatar Jan 15 '14 17:01 stevegreatrex

I'm re-cloning everything again. It builds fine on my side. I am using VS2013 tho, dont know if that will make a difference?

faniereynders avatar Jan 15 '14 20:01 faniereynders

We don't need the whole MetadataGenerator, I've merged that functionality into the Tasks project. I see all my recent changes was commited but not synced

faniereynders avatar Jan 15 '14 20:01 faniereynders

I'm using 2013 as well so that isn't the problem.

Let me know when you have the correct version in this PR and I'll try again

stevegreatrex avatar Jan 15 '14 20:01 stevegreatrex

Okay I've just added the missing files and synced properly. It should work now as I commited everything and cleared my local copy and pulled a fresh one from the server - and it builds :)

faniereynders avatar Jan 15 '14 20:01 faniereynders

Will my latest commit reflect in this PR?

faniereynders avatar Jan 15 '14 20:01 faniereynders

Great, I'll give it another shot tomorrow

stevegreatrex avatar Jan 15 '14 20:01 stevegreatrex

Yep, you can see it under the Commits section

stevegreatrex avatar Jan 15 '14 20:01 stevegreatrex

Alright, that now looks like all the expected files are in place. I have a few more questions/comments:

  • There are currently 19 failing unit tests - have you looked into them?
  • I don't see any unit tests for the new code..?
  • It looks like a few of the classes from ProxyApi.ElementDefinitions have been copied and then altered in ProxyApi.Tasks.Models - why not use the original classes?
  • Similarly, the CSharpProxyTemplate appears in both projects; which one should be used?
  • Minor point, but I feel myself die a little inside whenever I see hungarian notation - can we rename frmApiProxyConfig?
  • Is there a "sample use" project that we could include?

stevegreatrex avatar Jan 16 '14 09:01 stevegreatrex