Git Product home page Git Product logo

lab's People

Contributors

alanwong-ms avatar biaol-odata avatar brandon-irl avatar congysu avatar habbes avatar kanishmanuja-ms avatar karataliu avatar laylaliu avatar lewischeng-ms avatar lianwms avatar mohsenno1 avatar robward-ms avatar tchuan avatar tomdu avatar xuzhg 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lab's Issues

Support for OData versions lower than V4

Hi, OData2Swagger library seems to blow up when I feed the metadata of my service that is still on V1.0. The error I get is from the code below:
EdmxReader.TryParse(XmlReader.Create(metadataURI), out model, out errors);

Exception: "The element 'edmx:Edmx' was unexpected for the root element. The root element should be Edmx."

Did a little bit of digging around it seems this could be because of the namespace change with version v4.

Could you please advise how to make it compliant with previous versions?

Need version for VS2017

Any plans for supporting VS 2017 ? I tried opening the Vsix and changing to version 15, but that didnt work

Support for GroupBy and Aggregate at OData Connected Service

With the basic support for groupby and aggregates at the Server ( OData/WebApi#70 ), i think the Client should too be enabled to query those new features.

Actually the Microsoft.OData.Client.dll ( DataServiceQuery ) don't support make those queries.
It throws "An unhandled exception of type 'System.NotSupportedException' occurred in Microsoft.OData.Client.dll - The method 'GroupBy' is not supported".
But if you send the request manually it works.

Ex:
Users.GroupBy(user => user.Login);
as
http://localhost/odata/Users?$apply=groupby((Login));

Sign vsix with SHA-2

VSIX targeting Dev14 should be signed with SHA2 instead of SHA1, otherwise it will get the warning message although it could be uploaded into vs gallery

DefaultContainer?

In the CRUD documentation I see a deference to the DefaultContainer. I am not sure where that is located. I cannot find it.

Add license header for source files

Such as:

// Copyright (c) Microsoft Corporation.  All rights reserved.
// Licensed under the MIT License.  See License.txt in the project root for license information.

Connected Service - Entity collection properties should be lazy initialized

Imagine an entity with many properties of type DataServiceCollection<>. As an example - our File entity has 126 Properties of type DataServiceCollection<>

The auto-generated proxy will do eager initializing (as part of the construction process) of all these properties for each File entity returned from the server during the materialization process even when they are not needed (have not been expanded). The overhead of this is massive and can lead to an OutOfMemory exception when a lot a Files are handled. It is also very time consuming.

If I substitute the eager initialization of all DataServiceCollection<> properties (in the proxy/Reference.cs) with lazy initialization (like: p == null ? p = new DataServiceCollection…) the memory consumption is kept at a more reasonable level and I can handle loads of File objects. The overall time consumption is also significantly lower.

This change does however require changes to DataServicesClient/OData.Client, as it currently would just trigger the lazy initialization during GETs. Se here: OData/odata.net#662

Scaffolding doesn't handle entities with kebab-cased names

I'm consuming an OData API where the provider has the following entity as an example, with the namespace changed slightly to hide the providers name.

<EntitySet Name="subject-sets" EntityType="Service.Domain.Models.Projections.SubjectSet">
    <NavigationPropertyBinding Path="Tutor1" Target="staff" />
    <NavigationPropertyBinding Path="Tutor2" Target="staff" />
    <NavigationPropertyBinding Path="Tutor3" Target="staff" />
    <NavigationPropertyBinding Path="Pupil" Target="pupils" />
</EntitySet>

This is scaffolded by the OData Connected Service Extension to the following

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
[global::Microsoft.OData.Client.OriginalNameAttribute("subject-sets")]
public global::Microsoft.OData.Client.DataServiceQuery<global::Service.Domain.Models.Projections.SubjectSet> Subject-sets
{
    get
    {
        if ((this._Subject-sets == null))
        {
            this._Subject-sets = base.CreateQuery<global::Service.Domain.Models.Projections.SubjectSet>("subject-sets");
         }
         return this._Subject-sets;
    }
}

which causes issues.

This should instead be converted to either camel_cased or PascalCased

Service Reference vs Connected Service. UserID Password missing

Hi,

With a Service Reference, it correctly requests a user id and password. With Connected Service I cannot see how to achieve the same result - being prompted for, or fields for storing the user id and password.

Any ideas on how to achieve this now that Service Reference for OData no longer works in VS2017?

Thx, Darrell

p.s. same issue with Connected Service in VS2015.

OData folder should be service named

As a developer adds multiple services, the current implementation attempts to replace the same Reference.cs file. Actually, even tho I said [No] the reference.cs file was replaced.
The Connected Service guidance is to name the service folder, specific to the service being consumed. In this case, it would be named Ineta, or Telerik
odatarelacingreference

Connected Service - Compiled proxy very large

If you have a large model you end up with a very large compiled assembly. This is primarily due to the inclusion of a static string with the emdx in string format. In our scenario (we have around 400 different types) we end up with an assembly ~20MB in size. Simply removing the string version of the model and instead load it runtime reduces our proxy assembly to a more reasonable size of ~2MB.

It would be nice to have an option to exclude the static model and instead inject code for loading it runtime.

Allow developers to choose which objects to include

The model for Connected Services is to allow developers to consume a subset of the objects exposed on a feed, rather than "pollute" their project with lots of extra code they'll never use, but must maintain
We have a reference implementation with Salesforce for choosing the subset:
salesforceobjectselection

Need Auth support

When trying to add the SAP OData feed, it failed as I was never given an opportunity to authenticate.
Auth support needs to support the providers auth pattern. SAP has a few styles, including basic auth.
odataauthsupport

ProviderId should be consistent with other Microsoft ProviderIds

To be consistent with Connected Service Provider naming, and to align with the Microsoft specific providers, can you please name your ProviderId Microsoft.OData
Here’s an example of other Provider Ids

Datalogics.PDF.Web
Microsoft.Azure.AD
Microsoft.Azure.MobileServices
Microsoft.Azure.Storage
Microsoft.Office365
Microsoft.Samples.VSOnline
Microsoft.ApplicationInsights
Salesforce.ForceDotCom

Connecting Through Http Proxy Server

I have deployed a client application on an environment that requires all connections to be made through a specific http proxy server. How to pass that proxy server details to the OData Client Container?

Scaffolding over Generation

I see you’re using the historical generated code, where all the code is placed in a single file. I’m hoping this is just a crawl/walk run implementation. What we’d like to see is each of the model classes placed individually in a .\Models[ServiceName]\ folder.
Notice the Salesforce implementation:
This allows developers to work with these model files directly, not worry about them being overwritten, and you can now do updates, to add additional models as the service expands.
odatascaffoldobjects

Unable to create new record

Using following code to create new record:
var entity = new my_entity(); _crmContext.AddObject('my_entityset_name', entity); _crmContext.SaveChanges();
But enocuntered this error:
"message": "Invalid type for entity id value", "type": "System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
`
Any suggestion? And when adding new object, how to only send set properties?

add a way to modify the templates for post / delete / patch actions

I have a large project with many tables to provide common support for.
we have a standard that works with our back end database audit trail that I would like to
automate so that generating a new controller would be closer to our standard.

any chance we can do something to make that possible / easy?

Scaffolding Support on Composite Keys

Hi,
is there a simple way to have, from Code First Model like:

public class Person
    {
        [Key]
        public string FirstName { get; set; }
        [Key]
        public string LastName { get; set; }

        public int Age { get; set; }
    }

the scaffolded Controllers like in your Sample?:

[EnableQuery]
     public Person Get([FromODataUri] string firstName, [FromODataUri] string lastName)
     {
         Person person = _repo.Get(firstName, lastName);
         if (person == null)
         {
             throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
         }

         return person;
     }

Easy on small amount of entities... but large models... uhhh.

https://github.com/OData/ODataSamples/tree/master/WebApi/v4/ODataCompositeKeySample

Kind regards.

Unable to Connect

After I get the extension installed and expose the metadata to the public, the extension returns this when I try to add the connection. A detail about my connection is that we aren't currently using a valid SSL certificate. I can, however, pull the XML data up in a web browser.

Imgur

Generated swagger not passing validation

Using the ODATAServiceToSwagger tool with the swagger.io validator (http://online.swagger.io/validator/debug?url={YOUR.swagger.json}) will fail validation. Example response:
[ { "level": "error", "domain": "validation", "keyword": "oneOf", "message": "instance failed to match exactly one schema (matched 0 out of 2)", "schema": { "loadingURI": "http://swagger.io/v2/schema.json#", "pointer": "/definitions/parametersList/items" }, "instance": { "pointer": "/paths/~1AlertTemplates({AlertActionId})/get/parameters/0" } } ]

In particular, this is due to missing the "required" property for pathParameterSubSchema objects

Dialogs on Dialogs

Values on Advanced should be in the wizard pane. Popping dialogs has all sorts of issues from Themeing to visual placement, such as the location of the [OK] and [Cancel] buttons, dialog on top of a dialog, …
odatasettings

Adding OData Connected Service to the project failed: Value cannot be null

We are converting a VS2015 solution using WCF Data Services to VS2017. The web service itself seems to be working fine, but the database model has evolved and we now need to update our OData service reference.

Visual Studio displays an error message, warning us that "The specified OData API cannot be updated because OData APIs are now only supported with Connected Services". We downloaded the connected services extensions available here : https://marketplace.visualstudio.com/items?itemName=laylaliu.ODataConnectedService.

But we can't seem to generate a new OData client for any projet, even a new simple console application. The "OData Connected Service" wizard invariably fails in the "Finish" step with this error message: "Adding OData Connected Service to the project failed: Value cannot be null. Parameter name: path1".

OData Connected Service version: 0.3.0
Visual Studio version: 2017 Enterprise 15.3.3
.NET Framework version: 4.6.1
WCF Data Services versions (server-side):

  • Microsoft.Data.Edm: 5.6.0
  • Microsoft.Data.OData: 5.6.0
  • Microsoft.Data.Services: 5.6.0
  • Microsoft.Data.Services.Client: 5.6.0
  • Microsoft.OData.EntityFrameworkProvider: 1.0.0-alpha2
  • System.Spatial: 5.6.0

Here is the $metadata for our service:
$metadata.zip

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.