DMTF/Redfish-Mockup-Creator

Metadata references server stored schema but doesn't grab them

tomasg2012 opened this issue · 3 comments

<!-- Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). All rights reserved.-->
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
    <edmx:Reference Uri="/redfish/v1/Schemas/ServiceRoot_v1.xml">
        <edmx:Include Namespace="ServiceRoot"/>
        <edmx:Include Namespace="ServiceRoot.v1_0_0"/>
        <edmx:Include Namespace="ServiceRoot.v1_0_2"/>
    </edmx:Reference>
    <edmx:Reference Uri="/redfish/v1/Schemas/AccountService_v1.xml">
        <edmx:Include Namespace="AccountService"/>
        <edmx:Include Namespace="AccountService.v1_0_0"/>
        <edmx:Include Namespace="AccountService.v1_0_2"/>
    </edmx:Reference>
    <edmx:Reference Uri="/redfish/v1/Schemas/Chassis_v1.xml">
        <edmx:Include Namespace="Chassis"/>
        <edmx:Include Namespace="Chassis.v1_0_0"/>
        <edmx:Include Namespace="Chassis.v1_0_1"/>
        <edmx:Include Namespace="Chassis.v1_0_2"/>
    </edmx:Reference>

This is a $metadata file that uses local URIs vs URLs for its references to xml, it will not be gathered by the Creator, and therefore not served with the Mockup Server. It is true that Schemas is not listed as a ServiceRoot link and is nonstandard as of later versions, but for a Creator that needs to create working mockups, it will cause issues with clients.

Additionally, the Mockup Creator will not server local files as is, only if they are directories containing index files. Example:

│       ├── Schemas
│       │   ├── AccountService.1.0.0.json
│       │   │   └── index.json
│       │   ├── AccountService.json
│       │   │   └── index.json
│       │   ├── AccountService.v1_0_0.json
│       │   │   └── index.json
│       │   ├── AccountService.v1_0_2.json
│       │   │   └── index.json
│       │   ├── AccountService_v1.xml
│       │   │   └── index.xml
│       │   ├── AttributeRegistry.json
│       │   │   └── index.json
│       │   ├── AttributeRegistry.v1_0_0.json
│       │   │   └── index.json
...

Instead of

│       ├── Schemas
│       │   ├── AccountService.1.0.0.json
│       │   ├── AccountService.json
│       │   ├── AccountService.v1_0_0.json
│       │   ├── AccountService.v1_0_2.json
│       │   ├── AccountService_v1.xml
│       │   ├── AttributeRegistry.json
│       │   ├── AttributeRegistry.v1_0_0.json
...

This will be filed as a separate issue for the Creator, as it seems inconvenient for those who may just have wanted to curl/get the files themselves.

From TF meeting: functionality should be added so that both XML and JSON schema files will be pulled automatically

@pwvancil and @josue0175 any updates?

This was added with the last XML PR.