OAGi / Score

Score
MIT License
9 stars 6 forks source link

Refined custom x-oagis-* properties move to the BIE level, add x-oagis-bie-uri #1574

Closed dubnemo closed 11 months ago

dubnemo commented 1 year ago

Currently these properties are at the document level:

openapi: "3.0.3"
info:
  title: ""
  description: ""
  contact:
    name: ""
    url: ""
    email: [example@example.org](mailto:example@example.org)
  version: ""
  x-oagis-release: "10.10.1"
  x-oagis-release-date: "2023-11-01"
  x-oagis-license: ""

I suggest these be moved to the schema level with the BIE references, and furthermore add the x-oagis-bie-uri


  schemas:
    currentMaximumCapacity:
      x-oagis-bie-guid: "b23f6e07de174c2a83d585383af3d31a"
      x-oagis-bie-date-time: "2023-11-05T13:42:50+0000"
      x-oagis-bie-version: "V1"
      x-oagis-bie-uri: "https://oagiscore.net/profile_bie/866"
      x-oagis-release: "10.10.1"
      x-oagis-release-date: "2023-11-01"
      x-oagis-license: ""
hakjuoh commented 1 year ago

@elena-jelisic Here's a tip. You can check the current behavior at https://github.com/OAGi/Score/blob/4292fde81e01942089d4e59184945b931f450b65/score-http/score-http/src/main/java/org/oagi/score/gateway/http/api/bie_management/service/generate_expression/BieOpenAPIGenerateExpression.java#L217-L219 and https://github.com/OAGi/Score/blob/4292fde81e01942089d4e59184945b931f450b65/score-http/score-http/src/main/java/org/oagi/score/gateway/http/api/oas_management/service/generate_openapi_expression/OpenAPIGenerateExpression.java#L216-L218

Each schema would be added to schemas after all properties are filled out. Here's a code in BieOpenAPIGenerateExpression.java https://github.com/OAGi/Score/blob/4292fde81e01942089d4e59184945b931f450b65/score-http/score-http/src/main/java/org/oagi/score/gateway/http/api/bie_management/service/generate_expression/BieOpenAPIGenerateExpression.java#L384-L386

dubnemo commented 11 months ago

@elena-jelisic this looks very good. However x-oagis-license can be eliminated in lieu of the existing OAS capabilities. @hakjuoh @jim-wilson-kt Can you please provide the URL and License Name? Perhaps this can be defaulted in the future.

elena-jelisic commented 11 months ago

@dubnemo Scott, I have removed the 'x-oagis-license' property.