Giter Site home page Giter Site logo

openapitypeprovider's People

Contributors

dzoukr avatar panesofglass avatar tachyus-ryan 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  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

openapitypeprovider's Issues

openapitypeprovider\1.5.1\lib\netstandard2.0\OpenAPITypeProvider.dll cannot be loaded

I'm a bit confused why I'm getting this TypeProvider error. I've got the latest Visual Studio 15.8.7 installed.

Severity Code Description Project File Line Suppression State
Error FS3031 The type provider 'C:\Users\taggac.nuget\packages\openapitypeprovider\1.5.1\lib\netstandard2.0\OpenAPITypeProvider.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'C:\Users\taggac.nuget\packages\openapitypeprovider\1.5.1\lib\netstandard2.0\OpenAPITypeProvider.dll' which cannot be loaded or doesn't exist. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. RegisterDeadboltClients C:\Users\taggac\coreservices\RegisterDeadboltClients\FSC 1 Active

image

Setting DevOps build pipeline fails on permissions

This is probably for @dsyme & other fsprojects owner. I tried to setup automated build of this TP on Azure DevOps, but got error:

Unable to configure a service on the selected GitHub repository. This is likely caused by not having the necessary permission to manage hooks for the selected repository.

Do I need higher permissions for this repo? Or should I set different CI for this type provider?

Thanks for any hint.

Prefer schema name instead of property name

For yaml like this:

ObjectA:
  type: object
  properties:
    subObj:
        $ref: '#/components/schemas/ObjectB'

ObjectB:
  type: object
  properties:
    name:
      type: string

schemas contains ObjectB and SubObj instead of ObjectA. Since ObjectA is known name of schema, it should be preffered.

Fable

Hi! Is this library work with fable?

Example of calling the OpenAPI path

Hello,

I just tested this wonderful typeProvider and I'm able to create my JSON very nicely.
But I'm a bit confused what to do now.
Does this TP also expose functions to call the actual API? Or do I need to do that part myself?
If so, any samples or best practices on that?

Many thanks,

Florian

Array with nullable items not wrapped in Option

Hi,

Thanks for this great library. Maybe I'm missing something (haven't really used OpenAPI much), but an array with nullable items does not seem to come through with items wrapped in Option. For example:

"Example": {
        "title": "Example",
        "required": [ "items" ],
        "type": "object",
        "properties": {
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "type": "integer",
              "nullable": true
            },
            "description": "Should be Option<int>, but is just int"
          },
        }
      },

With this definition, Items is a List<int> rather than a List<Option<int>>. Is this a bug, or am I doing something wrong?

Expose paths as string templates

The format of the path url template is perfect for registering routes in ASP.NET Core. Consider adding a Template or AsString member/property to provide the path as a string for this use case.

Incorrect creation of enum values

Having enum like this on root level:

RiskSeverity:
  type: string
  enum:
    - NEGLIGIBLE
    - MINOR
    - MODERATE
    - MAJOR
    - SEVERE

creates type RiskSeverity with all cases having the same name RiskSeverity

Cannot read values from parsed schema with optional sub schema

Accessing parsed value in parsed.InvoiceAddress.Value.City from JSON

{"name":"Roman","invoiceAddress":{"city":"Prague","country":"CZE","street":"Krakovska 9b","zip":"15100"}}

throws

Unable to cast object of type 'Microsoft.FSharp.Core.FSharpOption`1[System.Object]' to type 'Microsoft.FSharp.Core.FSharpOption`1[OpenAPITypeProvider.ObjectValue]'.

oneOf/anyOf workaround

I'm considering using this TP, but I need to know a little bit more about how it handles oneOf/anyOf.

The readme states that oneOf and anyOf (well, it says manyOf, but that's an error, it should be anyOf) are not supported. But what happens when the TP encounters these in an OpenAPI document? Can it parse the document at all?

If the TP gives an error when encountering these, then that's a show-stopper for using this TP, because any API provider may add oneOf/anyOf at any time, rendering this TP suddenly useless for that API and requiring a massive rewrite of client code.

A workaround could be that oneOf and anyOf can be treated as allOf, except that everything is optional. Then at least you have the possibility to use the TP for documents that have oneOf/anyOf; you'd just have to make sure that you use a valid combination of properties.

Invite to move to fsprojects

Hi @Dzoukr!

Amazing work :)

Just to say there is an open invitation to move this to http://github.com/fsprojects should you wish. The main advantage is that there is a backup maintainer (can help make the project live a long time), and it can help attracting attention and raising visibility

Cheers!
Don

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.