Skip to content

Implement shared field constraints #186

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

Closed
wants to merge 5 commits into from
Closed
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
20 changes: 5 additions & 15 deletions gen/buf/validate/conformance/cases/bool_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 6 additions & 14 deletions gen/buf/validate/conformance/cases/bool_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2023 Buf Technologies, Inc.
#
# 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.

from buf.validate import validate_pb2 as _validate_pb2
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
Expand All @@ -36,3 +22,9 @@ class BoolConstFalse(_message.Message):
VAL_FIELD_NUMBER: _ClassVar[int]
val: bool
def __init__(self, val: bool = ...) -> None: ...

class BoolExample(_message.Message):
__slots__ = ("val",)
VAL_FIELD_NUMBER: _ClassVar[int]
val: bool
def __init__(self, val: bool = ...) -> None: ...
20 changes: 5 additions & 15 deletions gen/buf/validate/conformance/cases/bytes_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 6 additions & 14 deletions gen/buf/validate/conformance/cases/bytes_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2023 Buf Technologies, Inc.
#
# 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.

from buf.validate import validate_pb2 as _validate_pb2
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
Expand Down Expand Up @@ -120,3 +106,9 @@ class BytesIPv6Ignore(_message.Message):
VAL_FIELD_NUMBER: _ClassVar[int]
val: bytes
def __init__(self, val: _Optional[bytes] = ...) -> None: ...

class BytesExample(_message.Message):
__slots__ = ("val",)
VAL_FIELD_NUMBER: _ClassVar[int]
val: bytes
def __init__(self, val: _Optional[bytes] = ...) -> None: ...

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2023 Buf Technologies, Inc.
#
# 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.

from buf.validate import validate_pb2 as _validate_pb2
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
from google.protobuf import descriptor as _descriptor
Expand Down
Loading
Loading