akhansari / FSharp.OpenApi

F# Wrapper for OpenAPI.NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Required properties ar not aded.

OnurGumus opened this issue · comments

I have the following code

        let schema = apiSchema{
                                required ["api"]
                                title "CreditData"
                                properties [
                                    "api",apiSchema{schemaType "string"}
                                    "credit",
                                        apiSchema{
                                            schemaType "integer" 
                                            minimum 0
                                            
                                        }
                                ]
                              
                            }

But no matter what I do the required prop , "api" is not added to the required props if I use CE syntax but only works if I add the schema manually. Is this a bug or I am doing something wrong?

Created the PR #9 solving the problem.

Thank you Onur 👍

I'll also check all the code in order to fix map/add patterns.

Ok, I think it was the only one using Seq.map instead of Seq.iter