Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small rye open api #13589

Merged
merged 1 commit into from
Sep 8, 2020
Merged

Conversation

msmiths
Copy link
Contributor

@msmiths msmiths commented Aug 21, 2020

Initial implementation of the mpOpenAPI-2.0 feature.

Associated epic: #11020

@msmiths
Copy link
Contributor Author

msmiths commented Aug 21, 2020

#build

@LibbyBot
Copy link

Please code review feature-related files, @OpenLiberty/delivery-approvers

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_pbCioOOvEeqELpaeZj9ckg

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

@LibbyBot
Copy link

The build msmiths-13589-20200821-1422
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_pbCioOOvEeqELpaeZj9ckg
completed and has errors or failures.

For help analyzing your personal build, go to https://cognitive.hursley.ibm.com/buildAnalysis.html?uuid=_pbCioOOvEeqELpaeZj9ckg

@msmiths
Copy link
Contributor Author

msmiths commented Aug 24, 2020

I have checked through the output of the personal build and the failures are unrelated to my changes.

@msmiths
Copy link
Contributor Author

msmiths commented Aug 24, 2020

#build

@LibbyBot
Copy link

Please code review feature-related files, @OpenLiberty/delivery-approvers

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_7Yk_4OYYEeql06cgdrhuYw

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

The build msmiths-13589-20200824-1601
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_7Yk_4OYYEeql06cgdrhuYw
completed and has errors or failures.

For help analyzing your personal build, go to https://cognitive.hursley.ibm.com/buildAnalysis.html?uuid=_7Yk_4OYYEeql06cgdrhuYw

@LibbyBot
Copy link

@msmiths
Copy link
Contributor Author

msmiths commented Aug 25, 2020

#build

@LibbyBot
Copy link

Please code review feature-related files, @OpenLiberty/delivery-approvers

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_9ruLUObVEeql06cgdrhuYw

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

@LibbyBot
Copy link

The build msmiths-13589-20200825-1436
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_9ruLUObVEeql06cgdrhuYw
completed and has errors or failures.

For help analyzing your personal build, go to https://cognitive.hursley.ibm.com/buildAnalysis.html?uuid=_9ruLUObVEeql06cgdrhuYw

@msmiths
Copy link
Contributor Author

msmiths commented Aug 26, 2020

#build

@LibbyBot
Copy link

Please code review feature-related files, @OpenLiberty/delivery-approvers

@LibbyBot
Copy link

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_7t95YOd-Eeql06cgdrhuYw

Target locations of links might be accessible only to IBM employees.

@skasund
Copy link

skasund commented Aug 26, 2020

L2 message review completed

@LibbyBot
Copy link

@LibbyBot
Copy link

The build msmiths-13589-20200826-1046
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_7t95YOd-Eeql06cgdrhuYw
completed successfully!

@Azquelt
Copy link
Member

Azquelt commented Sep 3, 2020

This is absolutely horrible to review because you have lots of reformatting changes mixed in with code changes.

If you're going to reformat the whole file, please do it in a separate commit because otherwise your real changes get lost amongst the noise of the formatting changes.

Comment on lines 352 to 353
OpenApiDocument.INSTANCE.modelFromStaticFile(OpenApiProcessor.modelFromStaticFile(staticFile));
// OpenApiDocument.INSTANCE.modelFromAnnotations(OpenApiProcessor.modelFromAnnotations(config, IndexUtils.getIndexView(appClassloader, appContainer, config)));
OpenApiDocument.INSTANCE.modelFromAnnotations(OpenApiProcessor.modelFromAnnotations(config, IndexUtils.getIndexView(moduleInfo, config)));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another commented out line

* The host specified in VCAP_APPLICATION or null if it is not set.
*/
@FFDCIgnore(Exception.class)
public static String getVCAPHost() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you still want to support this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. Do Liberty instances still run in Cloud Foundry environments? If so, then I guess we need to continue to support it.

However, it does raise the question of what we need to do to ensure that the correct host/port are included in the servers section when OL is running in OpenShift... sitting behind a service or, indeed, a route.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is additional behaviour when running in CF. I have no idea whether it's still required. I know we specifically opted not to do anything additional for CF on the reactive messaging feature, for example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok... and we could certainly take that approach for OpenAPI since users are able to specify their own content for the servers section using a variety of mechanisms.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I don't mind either way, just as long as we've thought about it and decided what to do, rather than accidentally releasing something which we then have to support forever.

Comment on lines +11 to +13
@Version(Constants.OSGI_VERSION)
@TraceOptions(traceGroup = Constants.TRACE_GROUP, messageBundle = Constants.TRACE_OPENAPI)
package io.openliberty.microprofile.openapi20;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't how you're supposed to version packages.

Should be 1.0 in the release, with the major and minor versions being updated for future releases in accordance with semantic versioning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So... simply change Constants::OSGI_VERSION to be "1.0"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now that will do, going forwards, packages are versioned individually, so they're unlikely to have the same version.

@Azquelt
Copy link
Member

Azquelt commented Sep 4, 2020

There's an awful lot of code in this PR for a feature where we're pulling in a third-party library to do most of the work.

@msmiths
Copy link
Contributor Author

msmiths commented Sep 4, 2020

@Azquelt The majority of the code is the value add functionality that is not part of the MP OpenAPI specification, i.e.:

  • Validation
  • UI customization

If we were not continuing to support the value add functionality, we could get rid of approx. 45 java classes.

However, even in its current form, there are still significantly less classes than in the previous implementation in the com.ibm.ws.microprofile.openapi project because we are relying on SmallRye to do the annotation scanning... which is the bulk of the code.

@Azquelt
Copy link
Member

Azquelt commented Sep 4, 2020

Gotcha, that makes sense 👍

Copy link
Member

@Azquelt Azquelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good and we've talked through the remaining outstanding points.

@msmiths
Copy link
Contributor Author

msmiths commented Sep 4, 2020

#run-libby-bot #build

@LibbyBot
Copy link

LibbyBot commented Sep 4, 2020

Please code review feature-related files, @OpenLiberty/delivery-approvers

@LibbyBot
Copy link

LibbyBot commented Sep 4, 2020

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_F5W4sO65EeqT3K3gf94lOQ

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

LibbyBot commented Sep 4, 2020

@LibbyBot
Copy link

LibbyBot commented Sep 5, 2020

The build msmiths-13589-20200904-1545
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_F5W4sO65EeqT3K3gf94lOQ
completed and has errors or failures.

For help analyzing your personal build, go to https://cognitive.hursley.ibm.com/buildAnalysis.html?uuid=_F5W4sO65EeqT3K3gf94lOQ

MP OpenAPI 2.0 Initial Implementation

Remove com.ibm.ws.require.java8 bundle from .feature

Signed-off-by: Martin Smithson <msmiths@uk.ibm.com>

Specify edition-full in private .feature file

Signed-off-by: Martin Smithson <msmiths@uk.ibm.com>

Use the 2.0-RC2 version of MP OpenAPI

Signed-off-by: Martin Smithson <msmiths@uk.ibm.com>

Apply PR review comments

Signed-off-by: Martin Smithson <msmiths@uk.ibm.com>

Apply more PR review comments

Signed-off-by: Martin Smithson <msmiths@uk.ibm.com>
@msmiths
Copy link
Contributor Author

msmiths commented Sep 7, 2020

#run-libby-bot #build

@LibbyBot
Copy link

LibbyBot commented Sep 7, 2020

Please code review feature-related files, @OpenLiberty/delivery-approvers

@LibbyBot
Copy link

LibbyBot commented Sep 7, 2020

Your personal build request is at https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_dt10oPD1Eeq2j8eW2p4naw

Target locations of links might be accessible only to IBM employees.

@LibbyBot
Copy link

LibbyBot commented Sep 7, 2020

Code analysis and actions

DO NOT DELETE THIS COMMENT.
  • 106 product code files were changed.

  • Please describe in a separate comment how you tested your changes.

  • 27 infrastructure code files were changed.

  • 45 FAT files were changed, added, or removed.

  • Check that the build did not break the affected FAT suite(s).

  • 30 messages files were changed and need an L2 review.

  • @OpenLiberty/message-reviewer Please review.

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ro.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ja.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ru.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_fr.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_it.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_pl.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ko.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_cs.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ja.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_zh.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_pt_BR.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_de.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_pt_BR.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_es.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_zh.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_hu.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_de.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ru.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ro.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_es.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_it.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_zh_TW.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_fr.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ko.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_pl.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_hu.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_zh_TW.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_cs.nlsprops

  • 31 NLS files were changed and need an ID review.

  • @OpenLiberty/message-reviewer Please review.

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ro.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ja.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ru.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_fr.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_it.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_pl.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ko.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_cs.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_ja.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_zh.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_pt_BR.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_de.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_pt_BR.nlsprops

  • dev/com.ibm.websphere.appserver.features/visibility/public/mpOpenAPI-2.0/resources/l10n/io.openliberty.mpOpenAPI-2.0.properties

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_es.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_zh.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_hu.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_de.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ru.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ro.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_es.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_it.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_zh_TW.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_fr.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_ko.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_pl.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_hu.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/validation/resources/ValidationMessages_zh_TW.nlsprops

  • dev/io.openliberty.microprofile.openapi.2.0.internal/resources/io/openliberty/microprofile/openapi20/resources/OpenAPI_cs.nlsprops

@LibbyBot
Copy link

LibbyBot commented Sep 7, 2020

@LibbyBot
Copy link

LibbyBot commented Sep 7, 2020

The build msmiths-13589-20200907-1146
https://wasrtc.hursley.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildResult/_dt10oPD1Eeq2j8eW2p4naw
completed successfully!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants