Git Product home page Git Product logo

redfish-schema-creator's People

Contributors

dsandy12 avatar jautor avatar mraineri avatar tomasg2012 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redfish-schema-creator's Issues

Add detection and creation of OEM extensions

Allow creation of an OEM extension to existing defined schemas by accepting the "Oem" property in the root (likely with no other properties?) as the indication to output an OEM Extension schema rather than a full Redfish Resource definition.

Crash when enum description keys do not match enum values

A crash occurs within the XML tree library when an enumDescription / LongDescription key does not match a value in the enum list. While this is an error in the input, it would be helpful for the tool to validate that description entries match up with enum values. This can be easily reproduced using the test.json file in the repo, such as:

    "ThingType": "RackMount | Cheap | Expensive | Obsolete | Trendy",
    "ThingType!enumDescriptions": {
        "RackMount": "tmp",
        "SUPERCHEAP": "THIS VALUE DOES NOT MATCH A DEFINED ENUMERATION!",
        "Expensive": "tmp2",
        "Obsolete": "tmp3",
        "Trendy": "tmp4"
    },

Crash when using enum values from JSON schema

Using a json schema file as input, crash occurs when building a property with enumerations.

Traceback (most recent call last):
  File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 362, in <module>
    sys.exit(main())
  File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 325, in main
    csdl.build_csdl()
  File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 228, in build_csdl
    self.build_csdl_node(self.entity, key, descriptors)
  File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 279, in build_csdl_node
    self.csdl.append(create_enum_property(key, value, descriptors.get("enumDescr
iptions", None), descriptors.get("enumLongDescriptions", None)))
  File "c:\Users\jeff\Documents\Github\Redfish-Schema-Creator\csdl_creator.py",
line 146, in create_enum_property
    for value in enum_values:
TypeError: 'NoneType' object is not iterable

The error appears to be that the call is using value (single value) rather than the discovered/imported enum list. Changing the call to use the enum list resolves the crash and the function works properly.

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.