Skip to content

Support OpenApi summary and description #43

Description

@snebjorn

I'm consuming an OData endpoint from SAP and I've noticed that if I query the metadata like this /$metadata??sap-documentation=all stuff like this shows up.

<Documentation>
    <Summary>
        This is a summary.
    </Summary>
    <LongDescription>
        This is a long description.
    </LongDescription>
</Documentation>

Example

<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" 
    xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
    xmlns:sap="http://www.sap.com/Protocols/SAPData" Version="1.0">
    <edmx:DataServices m:DataServiceVersion="2.0">
        <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="MEH" xml:lang="en" sap:schema-version="1">
            <EntityType Name="Foo" sap:content-version="1">
                <Key>
                    <PropertyRef Name="fooNumber"/>
                </Key>
                <Property Name="fooCategory" Type="Edm.String" Nullable="false" MaxLength="1" sap:unicode="false" sap:label="fooCategory" sap:heading="C" sap:quickinfo="Foo category" sap:creatable="false" sap:updatable="false" sap:sortable="false" sap:filterable="false">
                    <Documentation>
                        <Summary>
                            This is a summary.
                        </Summary>
                        <LongDescription>
                            This is a long description.
                        </LongDescription>
                    </Documentation>
                </Property>
            </EntityType>
        </Schema>
    </edmx:DataServices>
</edmx:Edmx>

It would be really cool if that could be placed into the description and summary fields in the generated OpenAPI.

I don't know what is supposed to go into where, and I don't know if the <Documentation> element is an official OData Schema element.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions