raml-org / api-modeling-framework

DEPRECATED - This project has been moved
https://github.com/aml-org/amf
Other
27 stars 11 forks source link

Adding JS and Java bindings. #66

Open antoniogarrote opened 7 years ago

antoniogarrote commented 7 years ago

First take at the Object Oriented interface in the Java version.

The programming guide is here and the javadoc here

antoniogarrote commented 7 years ago

Added the JS bindings with some minor improvements for the Java ones.

The programming guide is here and the javadoc here

antoniogarrote commented 7 years ago

Missing better tests, generation of a web library and minor improvements before being good enough to close #64 and #65

sichvoge commented 7 years ago

Using: Java Bindings

I believe we are missing a getter in Endpoint to retrieve the parameters (URI parameters). Also missing that for APIDocumentation. For example, for the following RAML:

#%RAML 1.0
title: Test
version: '1.1'
baseUri: '{environment}.test.com/{version}'
baseUriParameters:
  environment: string

And the JSON-LD which is part of the APIDocumentation node:

"raml-http:parameter": {
      "@id": "file://#/base-uri/environment",
      "@type": [
        "raml-http:Parameter",
        "raml-doc:DomainElement"
      ],
      "raml-http:paramBinding": "domain",
      "raml-http:schema": {
        "@id": "file://#/base-uri/environment",
        "@type": [
          "raml-shapes:Scalar",
          "shacl:Shape"
        ],
        "shacl:dataType": {
          "@id": "xsd:string"
        }
      },
      "schema-org:name": "environment",
      "hydra:required": true
    }

I couldn't find any method to retrieve the baseUriParameter.

sichvoge commented 7 years ago

Using: Java Bindings

@antoniogarrote what are we doing to better support accessing type declarations? At the moment, I see that you can do getShape and get a string that contains a Shacl JSON string.

sichvoge commented 7 years ago

Thanks Antonio. Can you generate the javadoc again, please?