-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix: Usage of ref maxoccurs and minoccurs attributes #1260
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
Merged
w666
merged 10 commits into
vpulim:master
from
ydaniju:fix-usage-of-ref-maxoccurs-and-minoccurs
Nov 3, 2024
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b068f01
xsd for usage of ref maxoccurs and minoccurs
ydaniju c04aed7
fix dummy response
ydaniju ac777dc
fix max and min occur isse
ydaniju 4f69219
only send attr for element type
ydaniju b714adc
improve coverage
ydaniju 7fac97b
create test with overriding type
ydaniju 8923102
handle refs with array and non-array usage
ydaniju 8b3b85a
uncomment test
ydaniju 281995c
reduce test files to minimum
ydaniju 3e8dcdc
revert type
ydaniju File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...ponse-samples/GetSubscription__should_handle_ref_minOccurs_and_maxOccurs/EventService.xsd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<schema xmlns="http://www.w3.org/2001/XMLSchema" | ||
xmlns:EVT="http://ws.gematik.de/conn/EventService/v7.2" | ||
targetNamespace="http://ws.gematik.de/conn/EventService/v7.2" elementFormDefault="qualified" | ||
attributeFormDefault="unqualified" version="7.2.1"> | ||
<simpleType name="SubscriptionIDType"> | ||
<restriction base="string"> | ||
<maxLength value="64" /> | ||
</restriction> | ||
</simpleType> | ||
<element name="SubscriptionID" type="EVT:SubscriptionIDType"/> | ||
<element name="Subscribe"> | ||
<complexType> | ||
<sequence> | ||
<element ref="EVT:Subscription" /> <!--Reference to Subscription without minOccurs or maxOccurs--> | ||
</sequence> | ||
</complexType> | ||
</element> | ||
<element name="GetSubscription"> | ||
<complexType> | ||
<sequence> | ||
<element ref="EVT:SubscriptionID" minOccurs="0" /> | ||
</sequence> | ||
<attribute name="mandant-wide" type="boolean" use="optional" default="false" /> | ||
</complexType> | ||
</element> | ||
<element name="GetSubscriptionResponse"> | ||
<complexType> | ||
<sequence> | ||
<element name="Subscriptions"> | ||
<complexType> | ||
<sequence> | ||
<element ref="EVT:Subscription" minOccurs="0" maxOccurs="unbounded" /> <!--Reference to Subscription with minOccurs or maxOccurs--> | ||
</sequence> | ||
</complexType> | ||
</element> | ||
</sequence> | ||
</complexType> | ||
</element> | ||
<complexType name="SubscriptionType"> | ||
<sequence> | ||
<element ref="EVT:SubscriptionID" minOccurs="0" /> | ||
<element ref="EVT:TerminationTime" minOccurs="0" /> | ||
</sequence> | ||
</complexType> | ||
<element name="Subscription" type="EVT:SubscriptionType" /> | ||
<element name="TerminationTime" type="dateTime" /> | ||
</schema> |
1 change: 1 addition & 0 deletions
1
...-response-samples/GetSubscription__should_handle_ref_minOccurs_and_maxOccurs/request.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
13 changes: 13 additions & 0 deletions
13
...t-response-samples/GetSubscription__should_handle_ref_minOccurs_and_maxOccurs/request.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<soap:Envelope | ||
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:EVT="http://ws.gematik.de/conn/EventService/v7.2" | ||
xmlns:EVTW="http://ws.gematik.de/conn/EventService/WSDL/v7.2" | ||
> | ||
<soap:Body> | ||
<EVT:GetSubscription xmlns:EVT="http://ws.gematik.de/conn/EventService/v7.2" | ||
xmlns="http://ws.gematik.de/conn/EventService/v7.2"> | ||
</EVT:GetSubscription> | ||
</soap:Body> | ||
</soap:Envelope> |
13 changes: 13 additions & 0 deletions
13
...response-samples/GetSubscription__should_handle_ref_minOccurs_and_maxOccurs/response.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"Status": { | ||
"Result": "OK" | ||
}, | ||
"Subscriptions": { | ||
"Subscription": [ | ||
{ | ||
"SubscriptionID": "a24610ec-4069-4efc-a87e-5ab1d944ec5f", | ||
"TerminationTime": "2024-10-31T20:00:27.567+01:00" | ||
} | ||
] | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
...-response-samples/GetSubscription__should_handle_ref_minOccurs_and_maxOccurs/response.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> | ||
<S:Body> | ||
<ns11:GetSubscriptionResponse xmlns:ns2="http://ws.gematik.de/conn/ConnectorCommon/v5.0" | ||
xmlns:ns11="http://ws.gematik.de/conn/EventService/v7.2" | ||
> | ||
<ns2:Status> | ||
<ns2:Result>OK</ns2:Result> | ||
</ns2:Status> | ||
<ns11:Subscriptions> | ||
<ns11:Subscription> | ||
<ns11:SubscriptionID>a24610ec-4069-4efc-a87e-5ab1d944ec5f</ns11:SubscriptionID> | ||
<ns11:TerminationTime>2024-10-31T20:00:27.567+01:00</ns11:TerminationTime> | ||
</ns11:Subscription> | ||
</ns11:Subscriptions> | ||
</ns11:GetSubscriptionResponse> | ||
</S:Body> | ||
</S:Envelope> |
77 changes: 77 additions & 0 deletions
77
...est-response-samples/GetSubscription__should_handle_ref_minOccurs_and_maxOccurs/soap.wsdl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" | ||
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:EVT="http://ws.gematik.de/conn/EventService/v7.2" | ||
xmlns:EVTW="http://ws.gematik.de/conn/EventService/WSDL/v7.2" | ||
targetNamespace="http://ws.gematik.de/conn/EventService/WSDL/v7.2"> | ||
<documentation> | ||
Copyright (c) 2014, gematik - Gesellschaft für Telematikanwendungen der Gesundheitskarte mbH. | ||
Alle Rechte | ||
vorbehalten. | ||
Beschreibung: Konnektor Ereignisdienst | ||
version=7.2.0 | ||
</documentation> | ||
<types> | ||
<xs:schema> | ||
<xs:import schemaLocation="EventService.xsd" | ||
namespace="http://ws.gematik.de/conn/EventService/v7.2" /> | ||
</xs:schema> | ||
</types> | ||
<message name="SubscribeRequestMessage"> | ||
<part name="parameter" element="EVT:Subscribe" /> | ||
</message> | ||
<message name="SubscribeResponseMessage"> | ||
<part name="parameter" element="EVT:SubscribeResponse" /> | ||
</message> | ||
<message name="GetSubscriptionRequestMessage"> | ||
<part name="parameter" element="EVT:GetSubscription" /> | ||
</message> | ||
<message name="GetSubscriptionResponseMessage"> | ||
<part name="parameter" element="EVT:GetSubscriptionResponse" /> | ||
</message> | ||
<portType name="EventServicePortType"> | ||
<operation name="Subscribe"> | ||
<input message="EVTW:SubscribeRequestMessage" /> | ||
<output message="EVTW:SubscribeResponseMessage" /> | ||
<fault name="FaultMessage" message="EVTW:FaultMessage" /> | ||
</operation> | ||
<operation name="GetSubscription"> | ||
<input message="EVTW:GetSubscriptionRequestMessage" /> | ||
<output message="EVTW:GetSubscriptionResponseMessage" /> | ||
<fault name="FaultMessage" message="EVTW:FaultMessage" /> | ||
</operation> | ||
</portType> | ||
<binding name="EventServiceBinding" type="EVTW:EventServicePortType"> | ||
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> | ||
<operation name="Subscribe"> | ||
<soap:operation soapAction="http://ws.gematik.de/conn/EventService/v7.2#Subscribe" /> | ||
<input> | ||
<soap:body use="literal" /> | ||
</input> | ||
<output> | ||
<soap:body use="literal" /> | ||
</output> | ||
<fault name="FaultMessage"> | ||
<soap:fault name="FaultMessage" use="literal" /> | ||
</fault> | ||
</operation> | ||
<operation name="GetSubscription"> | ||
<soap:operation soapAction="http://ws.gematik.de/conn/EventService/v7.2#GetSubscription" /> | ||
<input> | ||
<soap:body use="literal" /> | ||
</input> | ||
<output> | ||
<soap:body use="literal" /> | ||
</output> | ||
<fault name="FaultMessage"> | ||
<soap:fault name="FaultMessage" use="literal" /> | ||
</fault> | ||
</operation> | ||
</binding> | ||
<service name="EventService"> | ||
<port name="EventServicePort" binding="EVTW:EventServiceBinding"> | ||
<soap:address location="http://127.0.0.1:8001/eventservice" /> | ||
</port> | ||
</service> | ||
</definitions> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.