Comments (14)
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.
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
from springwolf-core.
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.
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.
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.
Hi @timonback ,
sorry my bad putting Resolves #378 in PRs.
Could you reopen this issue?
from springwolf-core.
Hello,
@jenarp , @timonback let me try to accomplish this one.
AsyncAPI Studio -> https://studio.asyncapi.com/
shows minimum and maximum values as follows:
Need to display in a similar way, right?
from springwolf-core.
Dev test
from springwolf-core.
@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.
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.
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.
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.
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.
The change is available in the latest release. π
Thank you for the report/contribution and making Springwolf better!
from springwolf-core.
Related Issues (20)
- Configurable URL in Springwolf UI HOT 9
- StackOverflow during initialization HOT 10
- @AsyncOperation.Headers.Header#value is mandatory and renders as "enum" HOT 7
- TypeToClassConverter is unable to handle types `? extends <other>` HOT 3
- Allow for declaration of multiple co-existing AsyncAPIs HOT 3
- Easier control over quotes / always quote string values in YAML? HOT 11
- Build example for schema: error with SpringWolf 1.4.0, but working fine with 1.2.0 HOT 6
- java.lang.StackOverflowError: null in 1.4.0 release HOT 2
- [Enhancement request] SpringWolf to be compatible with Reactor Kafka HOT 6
- Schema introspection of Map<String,Foo> HOT 7
- AsyncListener/AsyncPublisher supports ElementType.TYPE HOT 5
- Upgrade issues from 1.2.0 to 1.4.0 Reactive HOT 3
- π META: Redesign `springwolf-ui`: Feedback, Discussion & Participation HOT 4
- Support for @KafkaListener beanRef HOT 2
- Support @Hidden annotation to hide certain eventhandlers/listeners HOT 6
- Support for a polymorphic payload HOT 11
- springwolf-amqp-example fails HOT 3
- Header definitions are overriding others HOT 4
- Error creating entityManagerFactory - NullPointerException in Hibernate during application startup with Java 17 and Spring Boot 3.3.2 HOT 5
- Cannot use @Header annotation with method parameters. UnsupportedOperationException: SchemaObjectMerger.merge is trying to put on immutable properties map. HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from springwolf-core.