Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

Commit 900d5a7

Browse files
committed
Merge pull request #211 from MartyBurns/master
made required elements of Authorization and ApplicationInformation minoccur=1
2 parents 8cbe0c6 + 0549ec9 commit 900d5a7

File tree

1 file changed

+41
-40
lines changed

1 file changed

+41
-40
lines changed

etc/espiDerived.xsd

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- edited with XMLSpy v2014 rel. 2 sp1 (x64) (http://www.altova.com) by National Institute of Standards & Technology (NIST) -->
23
<xs:schema xmlns="http://naesb.org/espi" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://naesb.org/espi" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.7.20131008">
34
<!--
45
==========================================================================
56
Schema: espiDerived.xsd
6-
Version: 0.7.20141220
7+
Version: 0.7.20150119
78
Author: Ron Pasquarelli & Marty Burns (Hypertek for NIST), John Teeter (for NIST), Don Coffin (Remi Networks)
89
==========================================================================
910
@@ -66,12 +67,12 @@ self link to this resource</xs:documentation>
6667
<xs:complexContent>
6768
<xs:extension base="IdentifiedObject">
6869
<xs:sequence>
69-
<xs:element name="dataCustodianId" type="String64" minOccurs="0">
70+
<xs:element name="dataCustodianId" type="String64">
7071
<xs:annotation>
7172
<xs:documentation>Contains the identifier for the Data Custodian. (e.g. "Sandbox Data Custodian")</xs:documentation>
7273
</xs:annotation>
7374
</xs:element>
74-
<xs:element name="dataCustodianApplicationStatus" type="DataCustodianApplicationStatus" minOccurs="0">
75+
<xs:element name="dataCustodianApplicationStatus" type="DataCustodianApplicationStatus">
7576
<xs:annotation>
7677
<xs:documentation>A code indicating the current status of the application. This value is provided by Data Custodian, cannot be modified by Third Party. (e.g. "2" => production)</xs:documentation>
7778
</xs:annotation>
@@ -106,12 +107,12 @@ self link to this resource</xs:documentation>
106107
<xs:documentation>Contains the base URI link to the authorization server. (e.g. "https://services.greenbuttondata.org/DataCustodian")</xs:documentation>
107108
</xs:annotation>
108109
</xs:element>
109-
<xs:element name="thirdPartyNotifyUri" type="xs:anyURI" minOccurs="0">
110+
<xs:element name="thirdPartyNotifyUri" type="xs:anyURI">
110111
<xs:annotation>
111112
<xs:documentation>URI used to notify ThirdParty that subscribed information is available. (e.g. "https://services.greenbuttondata.org/ThirdParty/espi/1_1/Notification")</xs:documentation>
112113
</xs:annotation>
113114
</xs:element>
114-
<xs:element name="authorizationServerAuthorizationEndpoint" type="xs:anyURI" minOccurs="0">
115+
<xs:element name="authorizationServerAuthorizationEndpoint" type="xs:anyURI">
115116
<xs:annotation>
116117
<xs:documentation>An OAuth 2.0 URI used by the client to obtain authorization from the resource owner via user-agent redirection - {AuthorizationServer}{AuthorizationPath}. (e.g. "https://services.greenbuttondata.org/DataCustodian/oauth/authorize" </xs:documentation>
117118
</xs:annotation>
@@ -121,33 +122,33 @@ self link to this resource</xs:documentation>
121122
<xs:documentation>A URI used by the client to register a Third Party with a Data Custodian via its {AuthorizationServer}{AuthorizationServer}{RegistrationPath}. (e.g. "https://services.greenbuttondata.org/DataCustodian/espi/1_1/register")</xs:documentation>
122123
</xs:annotation>
123124
</xs:element>
124-
<xs:element name="authorizationServerTokenEndpoint" type="xs:anyURI" minOccurs="0">
125+
<xs:element name="authorizationServerTokenEndpoint" type="xs:anyURI">
125126
<xs:annotation>
126127
<xs:documentation>An OAuth 2.0 URL used by the client to exchange an authorization grant for an access token, typically with client authentication. (e.g. "https://services.greenbuttondata.org/DataCustodian/oauth/token")</xs:documentation>
127128
</xs:annotation>
128129
</xs:element>
129-
<xs:element name="dataCustodianBulkRequestURI" type="xs:anyURI" minOccurs="0">
130+
<xs:element name="dataCustodianBulkRequestURI" type="xs:anyURI">
130131
<xs:annotation>
131132
<xs:documentation>{DataCustodianBulkRequestURI} URI of DataCustodian’s Bulk Request endpoint. The value is provided by the Data Custodian and cannot be modified by the ThirdParty. (e.g. "https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource/Batch/Bulk/{BulkID}" => bulkID from BR={bulkId} from Scope)</xs:documentation>
132133
</xs:annotation>
133134
</xs:element>
134-
<xs:element name="dataCustodianResourceEndpoint" type="xs:anyURI" minOccurs="0">
135+
<xs:element name="dataCustodianResourceEndpoint" type="xs:anyURI">
135136
<xs:annotation>
136137
<xs:documentation>{ResourceServer}{ResourcePath}. (e.g. "https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource")</xs:documentation>
137138
</xs:annotation>
138139
</xs:element>
139-
<xs:element name="thirdPartyScopeSelectionScreenURI" type="xs:anyURI" minOccurs="0">
140+
<xs:element name="thirdPartyScopeSelectionScreenURI" type="xs:anyURI">
140141
<xs:annotation>
141142
<xs:documentation>URI of the Scope Selection Screen used by the Retail Customer to select the characteristics of the Green Button data to be shared with the ThirdParty. (e.g. "https://services.greenbuttondata.org/ThirdParty/espi/1_1/RetailCustomer/ScopeSelection")</xs:documentation>
142143
</xs:annotation>
143144
</xs:element>
144-
<xs:element name="thirdPartyUserPortalScreenURI" type="xs:anyURI" minOccurs="0">
145+
<xs:element name="thirdPartyUserPortalScreenURI" type="xs:anyURI">
145146
<xs:annotation>
146147
<xs:documentation>URI of a Third Party’s web page for use with Green Button Connect My Data (e.g. "https://services.greenbuttondata.org/ThirdParty/espi/1_1/home")</xs:documentation>
147148
</xs:annotation>
148149
</xs:element>
149150
<!-- OAuth 2.0 fields -->
150-
<xs:element name="client_secret" type="String512" minOccurs="0">
151+
<xs:element name="client_secret" type="String512">
151152
<xs:annotation>
152153
<xs:documentation>A secret to be associated with this application, used to sign OAuth requests. This value is provided by Data Custodian (OAuth client_secret). (e.g. "secret")</xs:documentation>
153154
</xs:annotation>
@@ -157,22 +158,22 @@ self link to this resource</xs:documentation>
157158
<xs:documentation>The link to the logo image for the application. Size greater than 180 x 150 may be cropped or reduced (OAuth logo_uri). (e.g. "http://services.greenbuttondata.org/ThirdParty/favicon.png")</xs:documentation>
158159
</xs:annotation>
159160
</xs:element>
160-
<xs:element name="client_name" type="String256" minOccurs="0">
161+
<xs:element name="client_name" type="String256">
161162
<xs:annotation>
162163
<xs:documentation>The name of the application to which access will be granted (OAuth client_name). (e.g. "Green Button ThirdParty")</xs:documentation>
163164
</xs:annotation>
164165
</xs:element>
165-
<xs:element name="client_uri" type="xs:anyURI" minOccurs="0">
166+
<xs:element name="client_uri" type="xs:anyURI">
166167
<xs:annotation>
167168
<xs:documentation>The link to the main page of the application (OAuth client_uri). (e.g. "https://services.greenbuttondata.org/ThirdParty")</xs:documentation>
168169
</xs:annotation>
169170
</xs:element>
170-
<xs:element name="redirect_uri" type="xs:anyURI" minOccurs="0">
171+
<xs:element name="redirect_uri" type="xs:anyURI">
171172
<xs:annotation>
172173
<xs:documentation>The default redirect back to the application after authorization grant (OAuth redirect uri). (e.g. "https://services.greenbuttondata.org/ThirdParty/espi/1_1/OAuthCallBack")</xs:documentation>
173174
</xs:annotation>
174175
</xs:element>
175-
<xs:element name="client_id" type="String64" minOccurs="0">
176+
<xs:element name="client_id" type="String64">
176177
<xs:annotation>
177178
<xs:documentation>Contains the identifier for the Third Party (OAuth client_id). (e.g. "ThirdParty Name")</xs:documentation>
178179
</xs:annotation>
@@ -187,22 +188,22 @@ self link to this resource</xs:documentation>
187188
<xs:documentation>A URI that points to a human-readable Policy document for the Third Party Application. The policy usually describes how a Retail Customer's energy usage information will be used by the Third Party Application. (e.g. "http://services.greenbuttondata.org/ThirdParty/UsagePolicy")</xs:documentation>
188189
</xs:annotation>
189190
</xs:element>
190-
<xs:element name="software_id" type="String256" minOccurs="0">
191+
<xs:element name="software_id" type="String256">
191192
<xs:annotation>
192193
<xs:documentation>An identifier for the software that comprises the Third Party Application. The software_id is asserted by the Third Party software and is intended to be shared between all copies of the Third Party software. The value of this field MAY be a UUID [RFC4122]. (e.g. "MyCoolGreenButtonAnalyzer")</xs:documentation>
193194
</xs:annotation>
194195
</xs:element>
195-
<xs:element name="software_version" type="String32" minOccurs="0">
196+
<xs:element name="software_version" type="String32">
196197
<xs:annotation>
197198
<xs:documentation>A version identifier for the software that comprises a Third Party Application. The value of this field is a string that is intended to be compared using string equality matching. The value of the software_version SHOULD change on any update to the Third Party software. (e.g. "Version 1.00.00")</xs:documentation>
198199
</xs:annotation>
199200
</xs:element>
200-
<xs:element name="client_id_issued_at" type="TimeType" minOccurs="0">
201+
<xs:element name="client_id_issued_at" type="TimeType">
201202
<xs:annotation>
202203
<xs:documentation>Time date stamp at which this client_id was issued. Note the schema data type is TimeType and the presentation in OAuth message flow is xs:dateTime and requires a conversion when accessed. (e.g. "1403190000" => 2014-06-19T15:00:00Z)</xs:documentation>
203204
</xs:annotation>
204205
</xs:element>
205-
<xs:element name="client_secret_expires_at" type="TimeType" minOccurs="0">
206+
<xs:element name="client_secret_expires_at" type="TimeType">
206207
<xs:annotation>
207208
<xs:documentation>Date time at which this client_secret expires -- value of 0 means the client_secret never expires. (e.g. "0" => never expires)</xs:documentation>
208209
</xs:annotation>
@@ -213,38 +214,38 @@ self link to this resource</xs:documentation>
213214
<xs:documentation>Array of email addresses for people responsible for the Authorized Third Party Application. These MAY be made available to Retail Customers for support requests for the Authorized Third Party application. The Data Custodian Authorization Server MAY use the email addresses as identifiers for an Authorized Third Party application administrative page. (e.g. "[email protected]")</xs:documentation>
214215
</xs:annotation>
215216
</xs:element>
216-
<xs:element name="token_endpoint_auth_method" type="TokenEndPointMethod" minOccurs="0">
217+
<xs:element name="token_endpoint_auth_method" type="TokenEndPointMethod">
217218
<xs:annotation>
218219
<xs:documentation>The authentication method used by the OAuth 2.0 Token Endpoint to authenticate the Third Party Application. (e.g. "client_secret_basic")</xs:documentation>
219220
</xs:annotation>
220221
</xs:element>
221-
<xs:element name="scope" type="String256" minOccurs="0" maxOccurs="unbounded">
222+
<xs:element name="scope" type="String256" maxOccurs="unbounded">
222223
<xs:annotation>
223224
<xs:documentation> Space separated list of scope values the Third Party Application may use when requesting access Tokens. (e.g. "FB=1_3_4_5_8_13_18_19_31_34_35_39;IntervalDuration=900_3600;BlockDuration=Daily; HistoryLength= 34128000;SubscriptionFrequency=Daily; AccountCollection=5;BR=1;")</xs:documentation>
224225
</xs:annotation>
225226
</xs:element>
226-
<xs:element name="grant_types" type="GrantType" minOccurs="0" maxOccurs="unbounded">
227+
<xs:element name="grant_types" type="GrantType" minOccurs="2" maxOccurs="unbounded">
227228
<xs:annotation>
228229
<xs:documentation>Grant types this interface supports. (e.g. "client_credentials, authorization_code, refresh_token" in separate tags</xs:documentation>
229230
</xs:annotation>
230231
</xs:element>
231-
<xs:element name="response_types" type="ResponseType" minOccurs="0">
232+
<xs:element name="response_types" type="ResponseType">
232233
<xs:annotation>
233234
<xs:documentation>Response types supported. (e.g. "code")</xs:documentation>
234235
</xs:annotation>
235236
</xs:element>
236-
<xs:element name="registration_client_uri" type="xs:anyURI" minOccurs="0">
237+
<xs:element name="registration_client_uri" type="xs:anyURI">
237238
<xs:annotation>
238239
<xs:documentation>{ClientConfigurationURI} A URI used by a registered client to manage registration information. This URI is returned by the AuthorizationServer in the “registration_client_uri” field of the client information response. {AuthorizationServerRegistrationEndpoint}/ApplicationInformation/{ApplicationInformationID}. (e.g. "https://services.greenbuttondata.org/DataCustodian/espi/1_1/resource/ApplicationInformation/{ApplicationInformationID}/")</xs:documentation>
239240
</xs:annotation>
240241
</xs:element>
241242
<!-- OAuth 2.0 fields END -->
242-
<xs:element name="registration_access_token" minOccurs="0">
243+
<xs:element name="registration_access_token">
243244
<xs:annotation>
244245
<xs:documentation>A credential obtained during Third Party registration with the Data Custodian to enable access to the ApplicationInformation resource. This is persisted in the ApplicationInformation resource structure. (e.g. "fe82518d-e325-404e-978c-c02f9339bccc")</xs:documentation>
245246
</xs:annotation>
246247
</xs:element>
247-
<xs:element name="dataCustodianScopeSelectionScreenURI" minOccurs="0">
248+
<xs:element name="dataCustodianScopeSelectionScreenURI">
248249
<xs:annotation>
249250
<xs:documentation>The URI used by the Third Party to redirect the Retail Customer to the Data Custodian Scope Selection Screen (note that this will likely involve a dialog with the Retail Customer including a log in authentication process). (e.g. http://localhost:8080/DataCustodian/RetailCustomer/ScopeSelection)</xs:documentation>
250251
</xs:annotation>
@@ -267,29 +268,29 @@ Note: for privacy there is no identifier of the RetailCustomer in this structure
267268
<xs:complexContent>
268269
<xs:extension base="IdentifiedObject">
269270
<xs:sequence>
270-
<xs:element name="authorizedPeriod" type="DateTimeInterval" minOccurs="0">
271+
<xs:element name="authorizedPeriod" type="DateTimeInterval">
271272
<xs:annotation>
272273
<xs:documentation>Restricts access to requests or subscriptions within this date time interval. (e.g. "duration=31536000,start=1333252800")</xs:documentation>
273274
</xs:annotation>
274275
</xs:element>
275-
<xs:element name="publishedPeriod" type="DateTimeInterval" minOccurs="0">
276+
<xs:element name="publishedPeriod" type="DateTimeInterval">
276277
<xs:annotation>
277278
<xs:documentation>Restricts access to the objects within the associated resource that were published within this date time interval. (e.g. "duration=31536000" for most recent 365 days)</xs:documentation>
278279
</xs:annotation>
279280
</xs:element>
280-
<!--
281+
<!--
281282
<xs:element name="access_token" type="String512" minOccurs="0">
282283
<xs:annotation>
283284
<xs:documentation>Contains the access token associated with this authorization. (OAuth contains access_token for RetailCustomer resources obtained through authorization code flow, registration_access_token obtained in the registration process, and an access_token obtained through client credentials flow) (e.g. "AA886A7A-078D-4307-A3D9-AA036796DBC3")</xs:documentation>
284285
</xs:annotation>
285286
</xs:element>
286-
-->
287-
<xs:element name="status" type="AuthorizationStatus" minOccurs="0">
287+
-->
288+
<xs:element name="status" type="AuthorizationStatus">
288289
<xs:annotation>
289290
<xs:documentation>The status of this authorization. (e.g. "1" => active)</xs:documentation>
290291
</xs:annotation>
291292
</xs:element>
292-
<xs:element name="expires_at" type="TimeType" minOccurs="0">
293+
<xs:element name="expires_at" type="TimeType">
293294
<xs:annotation>
294295
<xs:documentation>Expiration period for the accessToken. (e.g. "1403190000" for 2014-06-19T15:00:00Z)</xs:documentation>
295296
</xs:annotation>
@@ -299,19 +300,19 @@ Note: for privacy there is no identifier of the RetailCustomer in this structure
299300
<xs:documentation>Type of grant being negotiated for. (e.g. "authorization_code")</xs:documentation>
300301
</xs:annotation>
301302
</xs:element>
302-
<!--
303+
<!--
303304
<xs:element name="refresh_token" type="String512" minOccurs="0">
304305
<xs:annotation>
305306
<xs:documentation>Used to obtain a fresh access_token. (e.g. "AA886A7A-078D-4307-A3D9-AA036796DBC4")</xs:documentation>
306307
</xs:annotation>
307308
</xs:element>
308-
-->
309-
<xs:element name="scope" type="String256" minOccurs="0">
309+
-->
310+
<xs:element name="scope" type="String256">
310311
<xs:annotation>
311312
<xs:documentation>Negotiated scope of the authorization. (e.g. "FB=1_3_4_5_13_14_15_1937_39;IntervalDuration=3600;BlockDuration=monthly;HistoryLength=94608000"</xs:documentation>
312313
</xs:annotation>
313314
</xs:element>
314-
<xs:element name="token_type" type="TokenType" minOccurs="0">
315+
<xs:element name="token_type" type="TokenType">
315316
<xs:annotation>
316317
<xs:documentation>Type of token used. (e.g. "Bearer")</xs:documentation>
317318
</xs:annotation>
@@ -331,12 +332,12 @@ Note: for privacy there is no identifier of the RetailCustomer in this structure
331332
<xs:documentation>Specific error URI for last returned error. (e.g. "na" if not supported)</xs:documentation>
332333
</xs:annotation>
333334
</xs:element>
334-
<xs:element name="resourceURI" type="xs:anyURI" minOccurs="0">
335+
<xs:element name="resourceURI" type="xs:anyURI">
335336
<xs:annotation>
336337
<xs:documentation>resourceURI that represents the data set authorized. Can be used in a GET of the resource subscription. (e.g. "http://localhost:8080/DataCustodian/espi/1_1/resource/Batch/Subscription/1")</xs:documentation>
337338
</xs:annotation>
338339
</xs:element>
339-
<xs:element name="authorizationURI" type="xs:anyURI" minOccurs="0">
340+
<xs:element name="authorizationURI" type="xs:anyURI">
340341
<xs:annotation>
341342
<xs:documentation>URI that can be used to update or delete this Authorization. (e.g. "http://localhost:8080/DataCustodian/espi/1_1/resource/Authorization/1")</xs:documentation>
342343
</xs:annotation>
@@ -1140,12 +1141,12 @@ Additional Complex Types
11401141
<xs:complexContent>
11411142
<xs:extension base="Object">
11421143
<xs:sequence>
1143-
<xs:element name="duration" type="UInt32" minOccurs="0">
1144+
<xs:element name="duration" type="UInt32">
11441145
<xs:annotation>
11451146
<xs:documentation>[correction] Duration of the interval, in seconds.</xs:documentation>
11461147
</xs:annotation>
11471148
</xs:element>
1148-
<xs:element name="start" type="TimeType" minOccurs="0">
1149+
<xs:element name="start" type="TimeType">
11491150
<xs:annotation>
11501151
<xs:documentation>[correction] Date and time that this interval started.</xs:documentation>
11511152
</xs:annotation>

0 commit comments

Comments
 (0)