Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
<jar.plugin.version>3.1.1</jar.plugin.version>
<javadoc.plugin.version>3.1.0</javadoc.plugin.version>
<maven-servicemix-depends.version>1.4.0</maven-servicemix-depends.version>
<!-- Forced to use the beta version as the latest 3.3.4 doesn't work properly with OpenAPI 3.0.2 -->
<openapi.generator.plugin.version>4.0.0-beta</openapi.generator.plugin.version>
<!-- Up rev from 4.0.0-beta to 4.0.2 fixing file path creation issues around '.' character -->
<openapi.generator.plugin.version>4.0.2</openapi.generator.plugin.version>
<release.plugin.version>2.5.3</release.plugin.version>
<resources.plugin.version>3.1.0</resources.plugin.version>
<source.plugin.version>3.0.1</source.plugin.version>
Expand Down
2 changes: 0 additions & 2 deletions rest/specs/src/main/filtered-resources/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ components:
required: true
schema:
type: string
format: uri
Copy link
Contributor

Choose a reason for hiding this comment

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

❗️ Although this API is not really out yet, this change is removing a restriction on the attribute that was there in the previous version. We shouldn't be changing the spec to fix test cases. If the new generator is generating the code as a URI now as opposed to a string as before then this is what it should be.

Copy link
Author

Choose a reason for hiding this comment

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

I'm not certain that I follow the logic.

If the API originally was generating "String someMethod()" and is now generating "URI someMethod()"; wouldn't it be more consistent in the API to require String to keep backwards compatibility. Or, are you saying that you prefer the harder restriction of URI and because this API is not released; the signature change won't matter (thereby change the unit test)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Currently what matters is the open api spec and not how the code was generated. The fact that the generator didn't put the right restrictions based on how it was specified is not an indication of what the specification of that version was. I think we need to stick with URI and be as specific as we can be. Code generation is something that has to be fixed separately. In other words, one couldn't say that the spec was accepting any strings since the spec was saying it should a URI. The code might have been wrong bu that is not the spec.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, I followed that. I'll make the necessary changes and get back to you once the unit tests are passing. Thanks for the clarification.

example: ${rest.server.url}/xyz

schemas:
Expand Down Expand Up @@ -307,7 +306,6 @@ components:
example: 4.6.9
url:
type: string
format: uri
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as before

description: >
An externally accessible url where the remote system is hosting REST services that can
can be reached. For DDF-based systems, this would be the base url for the CSW and
Expand Down