Skip to content

Commit

Permalink
drqs-175250988: 'balxml_configschema': Update with 'ValidateRootTag'.…
Browse files Browse the repository at this point in the history
… (#4749)
  • Loading branch information
sbreitstein authored and GitHub Enterprise committed May 21, 2024
1 parent fe6a357 commit a309594
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 42 deletions.
42 changes: 22 additions & 20 deletions groups/bal/balxml/balxml_configschema.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// balxml_configschema.cpp -*-C++-*- GENERATED FILE -- DO NOT EDIT
// balxml_configschema.cpp *DO NOT EDIT* @generated -*-C++-*-

#include <bsls_ident.h>
BSLS_IDENT_RCSID(balxml_configschema_cpp,"$Id$ $CSID$")
BSLS_IDENT_RCSID(balxml_configschema_cpp, "$Id$ $CSID$")

#include <balxml_configschema.h>

Expand Down Expand Up @@ -289,30 +289,32 @@ const char ConfigSchema::TEXT[] =
" </xs:documentation>\n"
" </xs:annotation>\n"
" </xs:element>\n"
" <xs:element name='ValidateRootTag' type='xs:boolean'\n"
" minOccurs='0' maxOccurs='1'\n"
" default='false'\n"
" bdem:allocatesMemory='0'\n"
" bdem:allowsDirectManipulation='0'>\n"
" <xs:annotation>\n"
" <xs:documentation>\n"
" Option to validate the root tag when decoding a structure.\n"
" </xs:documentation>\n"
" </xs:annotation>\n"
" </xs:element>\n"
" </xs:sequence>\n"
" </xs:complexType>\n"
"\n"
"</xs:schema>\n"
;

} // close namespace balxml
} // close enterprise namespace

// BAS_CODEGEN RUN BY code_from_xsd.pl RUN ON Thu Oct 29 10:41:51 EDT 2020
// GENERATED BY BLP_BAS_CODEGEN_2020.10.18
} // close namespace BloombergLP

// GENERATED BY BLP_BAS_CODEGEN_2024.05.02
// USING bas_codegen.pl -m cfg -p balxml -E --noExternalization --noAggregateConversion --noHashSupport balxml.xsd
// ----------------------------------------------------------------------------
// Copyright 2020 Bloomberg Finance L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------- END-OF-FILE ----------------------------------
// NOTICE:
// Copyright 2024 Bloomberg Finance L.P. All rights reserved.
// Property of Bloomberg Finance L.P. (BFLP)
// This software is made available solely pursuant to the
// terms of a BFLP license agreement which governs its use.
// ------------------------------- END-OF-FILE --------------------------------
32 changes: 11 additions & 21 deletions groups/bal/balxml/balxml_configschema.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// balxml_configschema.h -*-C++-*- GENERATED FILE -- DO NOT EDIT
// balxml_configschema.h *DO NOT EDIT* @generated -*-C++-*-
#ifndef INCLUDED_BALXML_CONFIGSCHEMA
#define INCLUDED_BALXML_CONFIGSCHEMA

#include <bsls_ident.h>
BSLS_IDENT_RCSID(balxml_configschema_h,"$Id$ $CSID$")
BSLS_IDENT_RCSID(balxml_configschema_h, "$Id$ $CSID$")
BSLS_IDENT_PRAGMA_ONCE

//@PURPOSE: Provide the service configuration schema
//
//@CLASSES:
// balxml::ConfigSchema: the configuration schema
//
//@DESCRIPTION: This component provides a namespace for the
//@DESCRIPTION: This component provides a namespace for the
// service configuration schema. This in-core representation of the schema
// is used to validate XML configuration data used to initialize the service.

Expand Down Expand Up @@ -42,25 +42,15 @@ bsl::ostream& balxml::operator<<(
return stream << schema.TEXT;
}

} // close enterprise namespace
} // close namespace BloombergLP
#endif

// BAS_CODEGEN RUN BY code_from_xsd.pl RUN ON Thu Oct 29 10:41:51 EDT 2020
// GENERATED BY BLP_BAS_CODEGEN_2020.10.18
// GENERATED BY BLP_BAS_CODEGEN_2024.05.02
// USING bas_codegen.pl -m cfg -p balxml -E --noExternalization --noAggregateConversion --noHashSupport balxml.xsd

// ----------------------------------------------------------------------------
// Copyright 2020 Bloomberg Finance L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------- END-OF-FILE ----------------------------------
// NOTICE:
// Copyright 2024 Bloomberg Finance L.P. All rights reserved.
// Property of Bloomberg Finance L.P. (BFLP)
// This software is made available solely pursuant to the
// terms of a BFLP license agreement which governs its use.
// ------------------------------- END-OF-FILE --------------------------------
14 changes: 13 additions & 1 deletion groups/bal/balxml/balxml_configschema.t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,18 @@ void TestUtil::loadDecoderOptions(ComplexTypeElement *decoderOptions)
SchemaUtil::append(&sequence, validateInputIsUtf8);
}

{
Element validateRootTag;
validateRootTag.name() = "ValidateRootTag";
validateRootTag.type() = "xs:boolean";
validateRootTag.minOccurs() = "0";
validateRootTag.maxOccurs() = "1";
validateRootTag.defaultValue() = "false";
validateRootTag.allowsDirectManipulation() = "0";
validateRootTag.allocatesMemory() = "0";
SchemaUtil::append(&sequence, validateRootTag);
}

SchemaUtil::append(decoderOptions, sequence);
}

Expand Down Expand Up @@ -526,7 +538,7 @@ int main(int argc, char *argv[])
// (modulo annotations) to the content that we expect.

typedef s_baltst::BasicSchemaUtil SchemaUtil;
ASSERT(
ASSERTV(configSchema, expectedSchema,
SchemaUtil::areEqualUpToAnnotation(configSchema, expectedSchema));
if (veryVerbose && !SchemaUtil::areEqualUpToAnnotation(
configSchema, expectedSchema)) {
Expand Down

0 comments on commit a309594

Please sign in to comment.