Skip to content

Convert the Input string into correct IOpenApiAny object #26

Closed

Description

@xuzhg

So far, we read string and only use OpenApiString to host it.

We should convert the string into the correct IOpenApiAny object.

Activity

  1. PerthCharern commented on Dec 6, 2017

    @PerthCharern
    Contributor

    Sam Xu (@xuzhg) Is this completed?

  2. PerthCharern commented on Dec 6, 2017

    @PerthCharern
    Contributor

    Looks like it's not. It only handles boolean right now.

  3. xuzhg commented on Dec 6, 2017

    @xuzhg
    ContributorAuthor

    Yes,can you help on this?

  4. xuzhg commented on Dec 6, 2017

    @xuzhg
    ContributorAuthor
    1. https://github.com/Microsoft/OpenAPI.NET/blob/master/src/Microsoft.OpenApi.Readers/ParseNodes/ValueNode.cs#L57

    We need to figure out to convert the string for known type. for example: "3.1415" should be converted into "Double" type.

    1. https://github.com/Microsoft/OpenAPI.NET/blob/master/src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs#L161-L179

    Do we need to support writing other primitive types, for example "Double", ...

  5. darrelmiller commented on Dec 11, 2017

    @darrelmiller
    Member

    Sam Xu (@xuzhg) I will open a new issue for writing out non-string primitives

  6. darrelmiller commented on Dec 12, 2017

    @darrelmiller
    Member

    Addressed by PR #117

  7. added a commit that references this issue on Oct 26, 2022
  8. added a commit that references this issue on Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions