Code Monkey home page Code Monkey logo

ui5-schemas's Issues

Bound aggregation attributes

Aggregations are not allowed as attributes. Example:
image

Can we have all aggregations of element as allowed attributes?

Binding Syntax

All attributes with expression binding and input validation get "Wrong attribute value":
image

Can expression binding be valid input for all attributes?

Atom support?

How do I use this in Atom?
I managed to install it via npm, but I think maybe I need a way to configure the SDK version?

Cannot install schemas - runtime exception

A shortdump says more than 100 words:

| => ui5-schemas 
ui5-schemas info Preparing 'sapui5' schemas in version 'latest'...
ui5-schemas info Yay, all schema files were successfully downloaded!
ui5-schemas info [enhance] Making schemas even cooler...
ui5-schemas error [enhance] TypeError: Cannot read property 'xsd:complexType' of undefined
    at sapUiCoreView (/Users/oliverjaegle/.nvm/versions/node/v8.11.4/lib/node_modules/ui5-schemas/lib/upgrade.js:27:34)
    at parser.parseString (/Users/oliverjaegle/.nvm/versions/node/v8.11.4/lib/node_modules/ui5-schemas/lib/upgrade.js:72:9)

Thanks for the effort of providing this, if it works, it's a must ;)

Install schemas into AppData

This will allow reuse of downloaded files. Furhtermore it will stop ui5-schemas from messing up users projects with a massive amount of files they will want to ignore. Not to mention the initial slowdown by indexing these files...

process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + 'Library/Preferences' : '/var/local')

ui5-schemas error [enhance] Error: Unexpected close tag

I installed ui5-schemas with npm install -g ui5-schemas
Then I try to execute ui5-schemas --sdk openui5nightly and get the following error:

ui5-schemas info Attempting to download latest version of 'openui5nightly'. Determining latest version...
ui5-schemas info https://openui5nightly.hana.ondemand.com/resources/sap-ui-version.json
ui5-schemas info Detected version of sdk 'openui5nightly' is '1.74.0-SNAPSHOT'
ui5-schemas info Preparing 'openui5nightly' schemas in version '1.74.0-SNAPSHOT'...
ui5-schemas info Yay, all schema files were successfully downloaded!
ui5-schemas info [enhance] Making schemas even cooler...
ui5-schemas error [enhance] Error: Unexpected close tag
Line: 46
Column: 8
Char: >
at error (C:\Program Files\nodejs\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:651:10)
at strictFail (C:\Program Files\nodejs\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:677:7)
at closeTag (C:\Program Files\nodejs\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:871:9)
at SAXParser.write (C:\Program Files\nodejs\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (C:\Program Files\nodejs\node_modules\ui5-schemas\node_modules\xml2js\lib\parser.js:322:31)
at Parser.parseString (C:\Program Files\nodejs\node_modules\ui5-schemas\node_modules\xml2js\lib\parser.js:5:59)
at C:\Program Files\nodejs\node_modules\ui5-schemas\lib\upgrade.js:103:14

When executing ui5-schemas --sdk openui5 in Node.js console everything is OK.

When I execute ui5-schemas --sdk openui5 withing IDEA 2019.3, I get an error:

C:\Users\User\IdeaProjects%PROJ%>ui5-schemas --sdk openui5
ui5-schemas info Attempting to download latest version of 'openui5'. Determining latest version...
ui5-schemas info https://openui5.hana.ondemand.com/resources/sap-ui-version.json
ui5-schemas info Detected version of sdk 'openui5' is '1.72.1'
ui5-schemas info Preparing 'openui5' schemas in version '1.72.1'...
ui5-schemas info Yay, all schema files were successfully downloaded!
ui5-schemas info [enhance] Making schemas even cooler...
ui5-schemas info [link] Discovered an .idea project! Registering schemas...
ui5-schemas error TypeError: Cannot read property 'filter' of undefined
at C:\Users\User\IdeaProjects%PROJ%\node_modules\ui5-schemas\lib\link.js:63:44
at Parser. (C:\Users\User\IdeaProjects%PROJ%\node_modules\xml2js\lib\parser.js:303:18)
at Parser.emit (events.js:223:5)
at SAXParser.onclosetag (C:\Users\User\IdeaProjects%PROJ%\node_modules\xml2js\lib\parser.js:261:26)
at emit (C:\Users\User\IdeaProjects%PROJ%\node_modules\sax\lib\sax.js:624:35)
at emitNode (C:\Users\User\IdeaProjects%PROJ%\node_modules\sax\lib\sax.js:629:5)
at closeTag (C:\Users\User\IdeaProjects%PROJ%\node_modules\sax\lib\sax.js:889:7)
at SAXParser.write (C:\Users\User\IdeaProjects%PROJ%\node_modules\sax\lib\sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (C:\Users\User\IdeaProjects%PROJ%\node_modules\xml2js\lib\parser.js:322:31)
at Parser.parseString (C:\Users\User\IdeaProjects%PROJ%\node_modules\xml2js\lib\parser.js:5:59)
at registerLibs (C:\Users\User\IdeaProjects%PROJ%\node_modules\ui5-schemas\lib\link.js:33:12)
at C:\Users\User\IdeaProjects%PROJ%\node_modules\ui5-schemas\lib\link.js:98:11
ui5-schemas info [enhance] Enhancing done!

Issue when running ui5-schemas - enhance

Hey there, have the following issue and not sure if bug in code or something I did. Can you help?
Removed user details.

`C:\Users-\ui5schemas>ui5-schemas

ui5-schemas info Preparing 'sapui5' schemas in version 'latest'...

ui5-schemas info Yay, all schema files were successfully downloaded!

ui5-schemas info [enhance] Making schemas even cooler...

ui5-schemas error [enhance] TypeError: Cannot read property 'xsd:complexType' of undefined

at sapUiCoreView (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\lib\upgrade.js:27:34)

at parser.parseString (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\lib\upgrade.js:72:9)

at Parser.<anonymous> (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\node_modules\xml2js\lib\parser.js:303:18)

at Parser.emit (events.js:189:13)

at SAXParser.onclosetag (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\node_modules\xml2js\lib\parser.js:261:26)

at emit (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:624:35)

at emitNode (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:629:5)

at closeTag (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:889:7)

at SAXParser.write (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\node_modules\sax\lib\sax.js:1436:13)

at Parser.exports.Parser.Parser.parseString (C:\Users\-\AppData\Roaming\npm\node_modules\ui5-schemas\node_modules\xml2js\lib\parser.js:322:31)`

Thanks!

Prevent duplicate schema registration

Running ui-schemas several times will link the schemas over and over again into misc.xml causing webstorm to slow down significantly and to unneccessarily trash it's config.

Support: is there a bug in the UI5 XSD files?

Hi there! ๐Ÿ˜„
Super nice project to have around!
I have an issue with schema validation in PHPStorm... I am not sure who's to blame: the IDE or the schemas from SAP!
Once the schemas are installed and linked to the IDE, the following view definition gives some errors:

<core:View controllerName="example.app.Controller"
           xmlns="sap.m"
           xmlns:tnt="sap.tnt"
           xmlns:core="sap.ui.core" displayBlock="true">
  <tnt:ToolHeader>
    <IconTabHeader>
      <items>
        <IconTabFilter text="{i18n>text}" key="the-key"/>
        <!--Invalid content was found starting with element '{"sap.m":IconTabFilter}'. One of '{"sap.ui.core":Control, "sap.ui.core":Fragment, WC["http://www.w3.org/1999/xhtml"]}' is expected.-->
      </items>
    </IconTabHeader>
  </tnt:ToolHeader>
</core:View>

Of course, IconTabFilter is actually a Control, but the validation fails here... Which is funny, because intelli-sense does suggest IconTabFilter as a valid element to be contained in the <items> aggregation ๐Ÿ™ƒ
Do you know whether this is an IDE's fault or an XSD's one?
Have you faced this issue before? If so... could you get around it? ๐Ÿ˜…
Thanks a lot and best regards!

TypeError: Cannot read property 'xsd:complexType' of undefined

Could you please help with the following errors? Thanks!

โœ— npx ui5-schemas
npx: installed 116 in 16.837s
ui5-schemas info Attempting to download latest version of 'sapui5'. Determining latest version...
ui5-schemas info https://sapui5.hana.ondemand.com/resources/sap-ui-version.json
ui5-schemas info Detected version of sdk 'sapui5' is '1.87.0'
ui5-schemas info Preparing 'sapui5' schemas in version '1.87.0'...
ui5-schemas info Yay, all schema files were successfully downloaded!
ui5-schemas info [enhance] Making schemas even cooler...
ui5-schemas error [enhance] TypeError: Cannot read property 'xsd:complexType' of undefined
at sapUiCoreView (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/lib/upgrade.js:29:34)
at /Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/lib/upgrade.js:108:9
at Parser. (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/xml2js/lib/parser.js:303:18)
at Parser.emit (events.js:314:20)
at SAXParser.onclosetag (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/xml2js/lib/parser.js:261:26)
at emit (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/sax/lib/sax.js:624:35)
at emitNode (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/sax/lib/sax.js:629:5)
at closeTag (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/sax/lib/sax.js:889:7)
at SAXParser.write (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/sax/lib/sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/xml2js/lib/parser.js:322:31)
at Parser.parseString (/Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/node_modules/xml2js/lib/parser.js:5:59)
at /Users/i/.npm/_npx/94835/lib/node_modules/ui5-schemas/lib/upgrade.js:103:14

XSD not loading for UI5 1.85.2

When I try to use the library for Webstorm I have this log:
C:\Projects\Webstorm\SAPUI5 Apps>ui5-schemas
ui5-schemas info Attempting to download latest version of 'sapui5'. Determining latest version...
ui5-schemas info https://sapui5.hana.ondemand.com/resources/sap-ui-version.json
ui5-schemas info Detected version of sdk 'sapui5' is '1.85.3'
ui5-schemas info Preparing 'sapui5' schemas in version '1.85.3'...
ui5-schemas info Yay, all schema files were successfully downloaded!
ui5-schemas info [enhance] Making schemas even cooler...
ui5-schemas info [link] Discovered an .idea project! Registering schemas...
ui5-schemas error [enhance] TypeError: Cannot read property 'xsd:complexType' of undefined
at sapUiCoreView (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\ui5-schemas\lib\upgrade.js:29:34)
at C:\Projects\Webstorm\SAPUI5 Apps\node_modules\ui5-schemas\lib\upgrade.js:107:9
at Parser. (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\xml2js\lib\parser.js:303:18)
at Parser.emit (node:events:329:20)
at SAXParser.onclosetag (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\xml2js\lib\parser.js:261:26)
at emit (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\sax\lib\sax.js:624:35)
at emitNode (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\sax\lib\sax.js:629:5)
at closeTag (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\sax\lib\sax.js:889:7)
at SAXParser.write (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\sax\lib\sax.js:1436:13)
at Parser.exports.Parser.Parser.parseString (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\xml2js\lib\parser.js:322:31)
at Parser.parseString (C:\Projects\Webstorm\SAPUI5 Apps\node_modules\xml2js\lib\parser.js:5:59)
at C:\Projects\Webstorm\SAPUI5 Apps\node_modules\ui5-schemas\lib\upgrade.js:102:14
ui5-schemas info [link] Schemas successfully registered!

The issue in XSD files - they are empty:
<!doctype html><title>HTTP Status 404 โ€“ Not Found</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style>

HTTP Status 404 โ€“ Not Found

Node JS - v15.2.0.
SAP UI5 - 1.85.2

ui5-schemas shell script fails to link WebStorm's ProjectResources

steps to reproduce:

  • add ui5schemas to existing src code repo via package.json: npm install ui5-schemas --save
  • run ui5-schemas (here via node_modules/.bin/ui5-schemas)
  • (downloads fine), then link error occurs
Discovered an .idea project!
Registering schemas...
{ Error: ENOENT: no such file or directory, open '/Users/xyz/git/my_modules/.idea/misc.xml'
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/xyz/git/my_modules/.idea/misc.xml' }

Proposed solution: check for .idea/misc.xml first and create if it doesn't exist

macOS 10.12.6
node 8.3.0

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.