Giter VIP home page Giter VIP logo

Comments (14)

timonback avatar timonback commented on September 26, 2024 1

Hi @aerfus ,
sure, thank you for volunteering.
Feel free to take inspiration from asyncapi studio and get creative :)

In case you plan larger changes, it might be easier for us, when you start from the branch feat/asyncapi-3 as it contains some ui refactorings.

The schema component could be a good starting point.
In case you have any questions, you are welcome to comment here on GH or ask on Discord.

from springwolf-core.

aerfus avatar aerfus commented on September 26, 2024 1

Hi @timonback,

I've added types to payloads headers
and example for primitive types.
Currently working on maximum and minimum values.

P.S. using feat/asyncapi-3

new_schemas_presentation

from springwolf-core.

aerfus avatar aerfus commented on September 26, 2024 1

Hi @timonback , @jenarp,
currently I'm working on exclusiveMinimum and exclusiveMaximum.

The fact I've noticed is in https://studio.asyncapi.com/
the values are Numeric, not Boolean.
The same is stated here https://unpkg.com/browse/@asyncapi/[email protected]/README.md.

I'll enhance the current implementation with Booleans.
FYI

from springwolf-core.

aerfus avatar aerfus commented on September 26, 2024 1

Hi @timonback ,
I've started working on tests for schema.component.ts.
Checkout was from timonback:test/add-jest-testing-to-springwolf-ui

from springwolf-core.

timonback avatar timonback commented on September 26, 2024 1

Hi @timonback , I've started working on tests for schema.component.ts. Checkout was from timonback:test/add-jest-testing-to-springwolf-ui

Hi @aerfus,
I am about to merge the jest PR. Due to squashing, you will need to rebase from the master branch. Sorry for the inconvenience.

from springwolf-core.

aerfus avatar aerfus commented on September 26, 2024 1

Hi @timonback ,
sorry my bad putting Resolves #378 in PRs.
Could you reopen this issue?

from springwolf-core.

aerfus avatar aerfus commented on September 26, 2024

Hello,
@jenarp , @timonback let me try to accomplish this one.

AsyncAPI Studio -> https://studio.asyncapi.com/
shows minimum and maximum values as follows:
minimum_maximum_example

Need to display in a similar way, right?

from springwolf-core.

aerfus avatar aerfus commented on September 26, 2024

Dev test

Screenshot 1
image
Screenshot 2
image

from springwolf-core.

timonback avatar timonback commented on September 26, 2024

@jenarp @aerfus As the first PR is merged, lets move the conversation to the issue.

Thank you @aerfus for adding maximum and minimum fields to springwolf-ui.


@jenarp Can you add a list of fields that you are interested in?

Based on the json-schema JsonSchemaGeneration I can imagine the following fields:

  • Const
  • Description
  • Enum
  • Nullable
  • Format
  • Items
  • Maximum
  • Minimum
  • MaxItems
  • MinItems
  • MaxLength
  • MinLength
  • MultipleOf
  • Name
  • Pattern
  • Required
  • Title
  • Type

( I believe when you copy this checkbox list to the issue description, Github views this as a checklist, which provides clarity on what is still missing.)

from springwolf-core.

jenarp avatar jenarp commented on September 26, 2024

Yes, examining the JSON schema is beneficial!
Swagger uses this as well.
When you look into the Swagger Schema within the library io/swagger/core/v3/swagger-annotations-jakarta/2.2.16/swagger-annotations-jakarta-2.2.16, particularly at package io.swagger.v3.oas.annotations.media, you'll find a comprehensive list of annotations used to define the schema. Here’s a list of interesting fields (not exhaustive) from the Schema annotation, including those from your list that weren't duplicates:

  • Const
  • Enum
  • Items
  • MaxItems
  • MinItems
  • Required
  • name: String (default: "")
  • title: String (default: "")
  • multipleOf: double (default: 0.0)
  • maximum: String (default: "")
  • exclusiveMaximum: boolean (default: false)
  • minimum: String (default: "")
  • exclusiveMinimum: boolean (default: false)
  • maxLength: int (default: Integer.MAX_VALUE)
  • minLength: int (default: 0)
  • pattern: String (default: "")
  • maxProperties: int (default: 0)
  • minProperties: int (default: 0)
  • requiredProperties: String[] (default: {})
  • requiredMode: Schema.RequiredMode (default: Schema.RequiredMode.AUTO)
  • description: String (default: "")
  • format: String (default: "")
  • ref: String (default: "")
  • nullable: boolean (default: false)
  • example: String (default: "")
  • externalDocs: ExternalDocumentation (default: @ExternalDocumentation)
  • deprecated: boolean (default: false)
  • type: String (default: "")
  • allowableValues: String[] (default: {})
  • defaultValue: String (default: "")
  • discriminatorProperty: String (default: "")
  • hidden: boolean (default: false)
  • enumAsRef: boolean (default: false)
  • types: String[] (default: {})
  • exclusiveMaximumValue: int (default: 0)
  • exclusiveMinimumValue: int (default: 0)

This list includes both the original fields you provided and the additional ones that were not duplicates.
It’s important to note that this list may not be exhaustive!

from springwolf-core.

timonback avatar timonback commented on September 26, 2024

Closed accidentally.

We updated the mapping in the backend, currently supported fields can be found in https://github.com/springwolf/springwolf-core/blob/master/springwolf-core%2Fsrc%2Fmain%2Fjava%2Fio%2Fgithub%2Fstavshamir%2Fspringwolf%2Fschemas%2FSwaggerSchemaUtil.java which require Angular frontend changes only to be displayed - besides updating the kafka example (add the field to the @Schema annotation as done for i.e. maximum) to demonstrate it

Any help is welcome

from springwolf-core.

timonback avatar timonback commented on September 26, 2024

In the new ui, a lot more fields are being displayed, namely the ones listed here: https://github.com/springwolf/springwolf-core/blob/master/springwolf-ui/src/app/models/schema.model.ts

Due to low activity, I will close this issue with the upcoming release.
Anyone feel free to suggest/contribute individual fields that are missing.

from springwolf-core.

github-actions avatar github-actions commented on September 26, 2024

The change is staged for release and will be part of the next release.

If you want to try and verify it in your application today,
use the latest 1.X.0-SNAPSHOT build as described in our README.md > Testing SNAPSHOT version

Thank you for the report/contribution!

from springwolf-core.

github-actions avatar github-actions commented on September 26, 2024

The change is available in the latest release. πŸŽ‰

Thank you for the report/contribution and making Springwolf better!

from springwolf-core.

Related Issues (20)

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.